-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement docker networks. Fixes #1982.
Update test_system_network.py Black formatting Prevents the use of 'host', 'bridge', and 'null' as connection names. Update test_system_network.py following implementation of docker networking. Check if rock-on uses host network and disable network customization if true. move existing & proposed low level docker functions to system/docker.py Helps to remove the possibility of circular imports Move existing docker_status from rockon_helpers to system/docker Improves separation of concerns between system level docker and Rock-ons Establish 'sysnet' (system/network) import name space within views Display rocknet details in Network summary table. Use docker_name for rocknets in network dashboard widget: Get containers and corresponding rock-on name into the connection's docker_options. Get Rocknet(s) for rockons: - Implement Rocknet Backbone Model: RockOnNetwork and its Collection - Create API call to fetch data from DContainerNetwork through RockOnNetwork - Display currently-attached rocknet(s) in rockon summary table Allow new networks to be specified directly from the field. Changes to DPort model: - add publish field - add container_name property method Join Networks: - Switch to sequential fetching of Ports, Containers, and then Networks as the latter need to be stopping. - Display user networks as multi-select field per containers in rock-on Unpublish Ports UI: Add backend logic to skip port at docker run time if unpublished Disable UI button if UI-port is unpublished Implement UI to Add, Edit, and Delete docker networks. Disallow connection toggle and edit for docker networks. Display docker_name in network summary table. Fix for Container_links: Create and connect each linked container to a given network defined in the Rock-on JSON definition file.
- Loading branch information
1 parent
701be40
commit 6469cee
Showing
28 changed files
with
2,155 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/rockstor/storageadmin/migrations/0013_auto_20200815_2004.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('storageadmin', '0012_auto_20200429_1428'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='BridgeConnection', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('docker_name', models.CharField(max_length=64, null=True)), | ||
('usercon', models.BooleanField(default=False)), | ||
('aux_address', models.CharField(max_length=2048, null=True)), | ||
('dgateway', models.CharField(max_length=64, null=True)), | ||
('host_binding', models.CharField(max_length=64, null=True)), | ||
('icc', models.BooleanField(default=False)), | ||
('internal', models.BooleanField(default=False)), | ||
('ip_masquerade', models.BooleanField(default=False)), | ||
('ip_range', models.CharField(max_length=64, null=True)), | ||
('subnet', models.CharField(max_length=64, null=True)), | ||
('connection', models.ForeignKey(to='storageadmin.NetworkConnection', null=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='DContainerNetwork', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('connection', models.ForeignKey(to='storageadmin.BridgeConnection')), | ||
('container', models.ForeignKey(to='storageadmin.DContainer')), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name='dport', | ||
name='publish', | ||
field=models.BooleanField(default=True), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='dcontainerlink', | ||
unique_together=set([('source', 'destination', 'name')]), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='dcontainernetwork', | ||
unique_together=set([('container', 'connection')]), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.