add controller_images to xoslib
diff --git a/xos/core/xoslib/static/js/xosAdminSite.js b/xos/core/xoslib/static/js/xosAdminSite.js
index f5c7566..07613ed 100644
--- a/xos/core/xoslib/static/js/xosAdminSite.js
+++ b/xos/core/xoslib/static/js/xosAdminSite.js
@@ -1,5 +1,7 @@
-OBJS = ['deployment', 'image', 'networkTemplate', 'network', 'networkSliver', 'node', 'service', 'site', 'slice', 'slicePrivilege', 'sliver', 'user', 'sliceRole', 'flavor', 'controller', 'siteDeployment'];
-// 'networkDeployment', 'userDeployment', 'sliceDeployment', 'imageDeployment'
+OBJS = ['deployment', 'image', 'networkTemplate', 'network', 'networkSliver',
+ 'node', 'service', 'site', 'slice', 'slicePrivilege', 'sliver',
+ 'user', 'sliceRole', 'flavor', 'controller', 'siteDeployment',
+ 'controller_image'];
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 375b52f..5291baf 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-backbone.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
@@ -23,6 +23,8 @@
FLAVOR_API = XOS_BASE+"/flavors/";
CONTROLLER_API = XOS_BASE+"/controllers/";
+ CONTROLLERIMAGE_API = XOS_BASE+"/controllerimages";
+
SLICEDEPLOYMENT_API = XOS_BASE+"/slicedeployments/";
USERDEPLOYMENT_API = XOS_BASE+"/userdeployments/";
@@ -556,6 +558,7 @@
});
define_model(this, {urlRoot: IMAGE_API,
+ relatedCollections: {"controller_images": "image"},
model: this.image,
modelName: "image",
listFields: ["backend_status", "id", "name", "disk_format", "container_format", "path"],
@@ -599,11 +602,20 @@
});
define_model(this, {urlRoot: CONTROLLER_API,
+ relatedCollections: {"controller_images": "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"],
});
+ define_model(this, {urlRoot: CONTROLLERIMAGE_API,
+ foreignCollections: ["images", "controllers"],
+ foreignFields: {"image": "images", "controller": "controllers"},
+ modelName: "controller_image",
+ listFields: ["backend_status", "id", "image", "controller", "glance_image_id"],
+ detailFields: ["backend_status", "image", "controller", "glance_image_id"],
+ });
+
/* removed
define_model(this, {urlRoot: CONTROLLERSITEDEPLOYMENT_API,
modelName: "controllerSiteDeployment",