fixed typo in 'image' property, now 'VSGWTenant' instead of 'VMMETenant'
added 'image_name' property to vSGW Tenant model
you can now choose which VM you want for a given instance
in tosca using the 'image_name' property
Change-Id: Idfcd29f871f31464d1c6e0717f000d0d5f603286
diff --git a/xos/admin.py b/xos/admin.py
index 8dc98d9..a7b9850 100644
--- a/xos/admin.py
+++ b/xos/admin.py
@@ -78,6 +78,7 @@
if self.instance:
self.fields['creator'].initial = self.instance.creator
self.fields['tenant_message'].initial = self.instance.tenant_message
+ self.fields['image_name'].initial = self.instance.image_name
if (not self.instance) or (not self.instance.pk):
self.fields['creator'].initial = get_request().user
@@ -87,6 +88,7 @@
def save(self, commit=True):
self.instance.creator = self.cleaned_data.get('creator')
self.instance.tenant_message = self.cleaned_data.get('tenant_message')
+ self.instance.image_name = self.cleaned_data.get('image_name')
return super(VSGWTenantForm, self).save(commit=commit)
@@ -95,11 +97,11 @@
verbose_name = TENANT_NAME_VERBOSE
verbose_name_plural = TENANT_NAME_VERBOSE_PLURAL
- list_display = ('id', 'backend_status_icon', 'instance', 'tenant_message')
- list_display_links = ('backend_status_icon', 'instance', 'tenant_message', 'id')
+ list_display = ('id', 'backend_status_icon', 'instance', 'tenant_message', 'image_name')
+ list_display_links = ('backend_status_icon', 'instance', 'tenant_message', 'id', 'image_name')
fieldsets = [(None, {
- 'fields': ['backend_status_text', 'kind', 'provider_service', 'instance', 'creator', 'tenant_message'],
+ 'fields': ['backend_status_text', 'kind', 'provider_service', 'instance', 'creator', 'tenant_message', 'image_name'],
'classes': ['suit-tab suit-tab-general'],
})]