Data model support for network access classes
diff --git a/xos/core/admin.py b/xos/core/admin.py
index be9dcc0..e41ad1d 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -1848,7 +1848,7 @@
user_readonly_inlines = []
inlines = [NetworkParameterInline,]
fieldsets = [
- (None, {'fields': ['name', 'description', 'guaranteed_bandwidth', 'visibility', 'translation', 'shared_network_name', 'shared_network_id', 'topology_kind', 'controller_kind'],
+ (None, {'fields': ['name', 'description', 'guaranteed_bandwidth', 'visibility', 'translation', 'access', 'shared_network_name', 'shared_network_id', 'topology_kind', 'controller_kind'],
'classes':['suit-tab suit-tab-general']}),]
suit_form_tabs = (('general','Network Template Details'), ('netparams', 'Parameters') )
diff --git a/xos/core/models/network.py b/xos/core/models/network.py
index 6894f9f..bb11307 100644
--- a/xos/core/models/network.py
+++ b/xos/core/models/network.py
@@ -100,12 +100,14 @@
TRANSLATION_CHOICES = (('none', 'none'), ('NAT', 'NAT'))
TOPOLOGY_CHOICES = (('bigswitch', 'BigSwitch'), ('physical', 'Physical'), ('custom', 'Custom'))
CONTROLLER_CHOICES = ((None, 'None'), ('onos', 'ONOS'), ('custom', 'Custom'))
+ ACCESS_CHOICES = ((None, 'None'), ('indirect', 'Indirect'), ('direct', 'Direct'))
name = models.CharField(max_length=32)
description = models.CharField(max_length=1024, blank=True, null=True)
guaranteed_bandwidth = models.IntegerField(default=0)
visibility = models.CharField(max_length=30, choices=VISIBILITY_CHOICES, default="private")
translation = models.CharField(max_length=30, choices=TRANSLATION_CHOICES, default="none")
+ access = models.CharField(max_length=30, null=True, blank=True, choices=ACCESS_CHOICES, help_text="Advertise this network as a means for other slices to contact this slice")
shared_network_name = models.CharField(max_length=30, blank=True, null=True)
shared_network_id = models.CharField(null=True, blank=True, max_length=256, help_text="Quantum network")
topology_kind = models.CharField(null=False, blank=False, max_length=30, choices=TOPOLOGY_CHOICES, default="BigSwitch")