add controllernetwork to xoslib
diff --git a/xos/core/xoslib/static/js/xosAdminSite.js b/xos/core/xoslib/static/js/xosAdminSite.js
index 07613ed..7a9f7b4 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_image', 'controller_network'];
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 5291baf..e837289 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-backbone.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
@@ -24,6 +24,7 @@
CONTROLLER_API = XOS_BASE+"/controllers/";
CONTROLLERIMAGE_API = XOS_BASE+"/controllerimages";
+ CONTROLLERNETWORK_API = XOS_BASE+"/controllernetworks";
SLICEDEPLOYMENT_API = XOS_BASE+"/slicedeployments/";
USERDEPLOYMENT_API = XOS_BASE+"/userdeployments/";
@@ -572,7 +573,7 @@
});
define_model(this, {urlRoot: NETWORK_API,
- relatedCollections: {"networkSlivers": "network"},
+ relatedCollections: {"networkSlivers": "network", "controller_networks": "network"},
foreignCollections: ["slices", "networkTemplates"],
modelName: "network",
foreignFields: {"template": "networkTemplates", "owner": "slices"},
@@ -602,7 +603,7 @@
});
define_model(this, {urlRoot: CONTROLLER_API,
- relatedCollections: {"controller_images": "controller"},
+ relatedCollections: {"controller_images": "controller", "controller_networks": "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"],
@@ -616,6 +617,14 @@
detailFields: ["backend_status", "image", "controller", "glance_image_id"],
});
+ define_model(this, {urlRoot: CONTROLLERNETWORK_API,
+ foreignCollections: ["networks", "controllers"],
+ foreignFields: {"network": "networks", "controller": "controllers"},
+ modelName: "controller_network",
+ listFields: ["backend_status", "id", "network", "controller", "net_id"],
+ detailFields: ["backend_status", "network", "controller", "net_id"],
+ });
+
/* removed
define_model(this, {urlRoot: CONTROLLERSITEDEPLOYMENT_API,
modelName: "controllerSiteDeployment",