add field to prevent network from being auto-connected as a slice's default private net
diff --git a/xos/core/admin.py b/xos/core/admin.py
index df2a661..7590519 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -1738,14 +1738,19 @@
form=NetworkForm
fieldsets = [
- (None, {'fields': ['backend_status_text', 'name','template','ports','labels','owner','guaranteed_bandwidth', 'permit_all_slices','permitted_slices','network_id','router_id','subnet_id','subnet'],
+ (None, {'fields': ['backend_status_text', 'name','template','ports','labels',
+ 'owner','guaranteed_bandwidth', 'permit_all_slices',
+ 'permitted_slices','network_id','router_id','subnet_id',
+ 'subnet', 'autoconnect'],
'classes':['suit-tab suit-tab-general']}),
(None, {'fields': ['topology_parameters', 'controller_url', 'controller_parameters'],
'classes':['suit-tab suit-tab-sdn']}),
]
readonly_fields = ('backend_status_text', )
- user_readonly_fields = ['name','template','ports','labels','owner','guaranteed_bandwidth', 'permit_all_slices','permitted_slices','network_id','router_id','subnet_id','subnet']
+ user_readonly_fields = ['name','template','ports','labels','owner','guaranteed_bandwidth',
+ 'permit_all_slices','permitted_slices','network_id','router_id',
+ 'subnet_id','subnet','autoconnect']
@property
def suit_form_tabs(self):
diff --git a/xos/core/models/network.py b/xos/core/models/network.py
index 57049e9..83fa701 100644
--- a/xos/core/models/network.py
+++ b/xos/core/models/network.py
@@ -119,6 +119,8 @@
router_id = models.CharField(null=True, blank=True, max_length=256, help_text="Quantum router id")
subnet_id = models.CharField(null=True, blank=True, max_length=256, help_text="Quantum subnet id")
+ autoconnect = models.BooleanField(default=True, help_text="This network can be autoconnected to the slice that owns it")
+
def __unicode__(self): return u'%s' % (self.name)
def save(self, *args, **kwds):