Fixed Sync Problem which will cause MAAS failed
Change-Id: I696abcf35774339689c3d97eabd7ab88612fd740
diff --git a/xos/admin.py b/xos/admin.py
index ef7503f..3a02eeb 100644
--- a/xos/admin.py
+++ b/xos/admin.py
@@ -10,11 +10,11 @@
# The class to provide an admin interface on the web for the service.
# We do only configuration here and don't change any logic because the logic
# is taken care of for us by ReadOnlyAwareAdmin
-class MCORDServiceAdmin(ReadOnlyAwareAdmin):
+class VBBUServiceAdmin(ReadOnlyAwareAdmin):
# We must set the model so that the admin knows what fields to use
- model = MCORDService
- verbose_name = "MCORD Service"
- verbose_name_plural = "MCORD Services"
+ model = VBBUService
+ verbose_name = "VBBU Service"
+ verbose_name_plural = "VBBU Services"
# Setting list_display creates columns on the admin page, each value here
# is a column, the column is populated for every instance of the model.
@@ -59,14 +59,14 @@
# Used to include a template for a tab. Here we include the
# helloworldserviceadmin template in the top position for the administration
# tab.
- suit_form_includes = (('mcordadmin.html',
+ suit_form_includes = (('admin.html',
'top',
'administration'),)
# Used to get the objects for this model that are associated with the
# requesting user.
def queryset(self, request):
- return MCORDService.get_service_objects_by_user(request.user)
+ return VBBUService.get_service_objects_by_user(request.user)
# Class to represent the form to add and edit tenants.
# We need to define this instead of just using an admin like we did for the
@@ -87,7 +87,7 @@
# Define the logic for obtaining the objects for the provider_service
# dropdown of the tenant form.
self.fields[
- 'provider_service'].queryset = MCORDService.get_service_objects().all()
+ 'provider_service'].queryset = VBBUService.get_service_objects().all()
# Set the initial kind to HELLO_WORLD_KIND for this tenant.
self.fields['kind'].initial = MCORD_KIND
# If there is an instance of this model then we can set the initial
@@ -100,8 +100,8 @@
# If there is not an instance then we need to set initial values.
if (not self.instance) or (not self.instance.pk):
self.fields['creator'].initial = get_request().user
- if MCORDService.get_service_objects().exists():
- self.fields["provider_service"].initial = MCORDService.get_service_objects().all()[0]
+ if VBBUService.get_service_objects().exists():
+ self.fields["provider_service"].initial = VBBUService.get_service_objects().all()[0]
# This function describes what happens when the save button is pressed on
# the tenant form. In this case we set the values for the instance that were
@@ -140,5 +140,5 @@
# Associate the admin forms with the models.
-admin.site.register(MCORDService, MCORDServiceAdmin)
+admin.site.register(VBBUService, VBBUServiceAdmin)
admin.site.register(VBBUTenant, VBBUTenantAdmin)