add controller_slice to xoslib
diff --git a/xos/core/xoslib/static/js/xosAdminSite.js b/xos/core/xoslib/static/js/xosAdminSite.js
index 7a9f7b4..3dccd81 100644
--- a/xos/core/xoslib/static/js/xosAdminSite.js
+++ b/xos/core/xoslib/static/js/xosAdminSite.js
@@ -1,7 +1,7 @@
OBJS = ['deployment', 'image', 'networkTemplate', 'network', 'networkSliver',
'node', 'service', 'site', 'slice', 'slicePrivilege', 'sliver',
'user', 'sliceRole', 'flavor', 'controller', 'siteDeployment',
- 'controller_image', 'controller_network'];
+ 'controller_image', 'controller_network', 'controller_slice'];
NAV_OBJS = ['deployment', 'site', 'slice', 'user'];
REWRITES = {"/admin/core/deployment/": "#deployments",
diff --git a/xos/core/xoslib/static/js/xoslib/xos-backbone.js b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
index e837289..b8d02ee 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-backbone.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
@@ -25,6 +25,7 @@
CONTROLLERIMAGE_API = XOS_BASE+"/controllerimages";
CONTROLLERNETWORK_API = XOS_BASE+"/controllernetworks";
+ CONTROLLERSLICE_API = XOS_BASE+"/controllerslices";
SLICEDEPLOYMENT_API = XOS_BASE+"/slicedeployments/";
USERDEPLOYMENT_API = XOS_BASE+"/userdeployments/";
@@ -479,7 +480,7 @@
});
define_model(this, {urlRoot: SLICE_API,
- relatedCollections: {"slivers": "slice", "slicePrivileges": "slice", "networks": "owner"},
+ relatedCollections: {"slivers": "slice", "slicePrivileges": "slice", "networks": "owner", "controller_slices": "slice"},
foreignCollections: ["services", "sites"],
foreignFields: {"service": "services", "site": "sites"},
listFields: ["backend_status", "id", "name", "enabled", "description", "slice_url", "site", "max_slivers", "service"],
@@ -603,7 +604,7 @@
});
define_model(this, {urlRoot: CONTROLLER_API,
- relatedCollections: {"controller_images": "controller", "controller_networks": "controller"},
+ relatedCollections: {"controller_images": "controller", "controller_networks": "controller", "controller_slices": "controller"},
modelName: "controller",
listFields: ["backend_status", "id", "name", "version", "backend_type"],
detailFields: ["backend_status", "name", "version", "backend_type", "auth_url", "admin_user", "admin_password", "admin_tenant"],
@@ -625,6 +626,14 @@
detailFields: ["backend_status", "network", "controller", "net_id"],
});
+ define_model(this, {urlRoot: CONTROLLERSLICE_API,
+ foreignCollections: ["slices", "controllers"],
+ foreignFields: {"slice": "slices", "controller": "controllers"},
+ modelName: "controller_slice",
+ listFields: ["backend_status", "id", "slice", "controller", "tenant_id"],
+ detailFields: ["backend_status", "slice", "controller", "tenant_id"],
+ });
+
/* removed
define_model(this, {urlRoot: CONTROLLERSITEDEPLOYMENT_API,
modelName: "controllerSiteDeployment",