Add autoconfig
diff --git a/xos/configurations/cord-pod/make-fabric-yaml.sh b/xos/configurations/cord-pod/make-fabric-yaml.sh
index 948bc3e..a829690 100644
--- a/xos/configurations/cord-pod/make-fabric-yaml.sh
+++ b/xos/configurations/cord-pod/make-fabric-yaml.sh
@@ -67,5 +67,5 @@
node: service#fabric
relationship: tosca.relationships.UsedByService
properties:
- dependencies:
+ dependencies: org.onosproject.lldpprovider, org.onosproject.hostprovider, org.onosproject.openflow-base, org.onosproject.openflow, org.onosproject.drivers, org.onosproject.segmentrouting
EOF
diff --git a/xos/services/fabric/admin.py b/xos/services/fabric/admin.py
index 5dc5923..e372a7d 100644
--- a/xos/services/fabric/admin.py
+++ b/xos/services/fabric/admin.py
@@ -35,7 +35,7 @@
verbose_name_plural = "Fabric Services"
list_display = ("backend_status_icon", "name", "enabled")
list_display_links = ('backend_status_icon', 'name', )
- fieldsets = [(None, {'fields': ['backend_status_text', 'name','enabled','versionNumber', 'description', "view_url", "icon_url", ],
+ fieldsets = [(None, {'fields': ['backend_status_text', 'name','enabled','versionNumber', 'description', "view_url", "icon_url", "autoconfig", ],
'classes':['suit-tab suit-tab-general']})]
readonly_fields = ('backend_status_text', )
inlines = [SliceInline,ServiceAttrAsTabInline,ServicePrivilegeInline]
@@ -60,4 +60,3 @@
return FabricService.get_service_objects_by_user(request.user)
admin.site.register(FabricService, FabricServiceAdmin)
-
diff --git a/xos/services/fabric/models.py b/xos/services/fabric/models.py
index 0bf6a14..2bf8a0b 100644
--- a/xos/services/fabric/models.py
+++ b/xos/services/fabric/models.py
@@ -27,4 +27,6 @@
verbose_name = "Fabric Service"
proxy = True
+ simple_attributes = ( ("autoconfig": True) )
+FabricService.setup_simple_attributes()
diff --git a/xos/synchronizers/fabric/steps/sync_vsgtenant.py b/xos/synchronizers/fabric/steps/sync_vsgtenant.py
index 57c65cc..cbc7949 100644
--- a/xos/synchronizers/fabric/steps/sync_vsgtenant.py
+++ b/xos/synchronizers/fabric/steps/sync_vsgtenant.py
@@ -35,6 +35,10 @@
return tags[0].value
def fetch_pending(self, deleted):
+ fs = FabricService.get_service_objects().all()[0]
+ if not fs.autoconfig:
+ return None
+
if (not deleted):
objs = VSGTenant.get_tenant_objects().filter(Q(lazy_blocked=False))
else: