epc-as-a-service functionality added

Change-Id: I5666e03a92b309a16309f4cb832211cdd9e632b2
diff --git a/xos/models.py b/xos/models.py
index a119fce..215d71a 100644
--- a/xos/models.py
+++ b/xos/models.py
@@ -15,13 +15,16 @@
 import traceback
 from xos.exceptions import *
 from xos.config import Config
-from django.contrib.contenttypes.models import ContentType
-from django.contrib.contenttypes.fields import GenericForeignKey
 
 class VMMService(VMMService_decl):
    class Meta:
         proxy = True 
 
+   def create_tenant(self, **kwargs):
+       t = VMMTenant(kind="vEPC", provider_service=self, connect_method="na", **kwargs)
+       t.save()
+       return t
+
 class VMMTenant(VMMTenant_decl):
    class Meta:
         proxy = True 
@@ -34,6 +37,13 @@
        super(VMMTenant, self).__init__(*args, **kwargs)
 
    def save(self, *args, **kwargs):
+       if not self.creator:
+           if not getattr(self, "caller", None):
+               raise XOSProgrammingError("VMMTenant's self.caller was not set")
+           self.creator = self.caller
+           if not self.creator:
+               raise XOSProgrammingError("VMMTenant's self.creator was not set")
+
        super(VMMTenant, self).save(*args, **kwargs)
        # This call needs to happen so that an instance is created for this
        # tenant is created in the slice. One instance is created per tenant.
diff --git a/xos/tosca/custom_types/vmm.m4 b/xos/tosca/custom_types/vmm.m4
index e24c534..512a2ba 100644
--- a/xos/tosca/custom_types/vmm.m4
+++ b/xos/tosca/custom_types/vmm.m4
@@ -22,7 +22,4 @@
             VMM Tenant
         properties:
             xos_base_tenant_props
-            tenant_message:
-                type: string
-                required: false
 
diff --git a/xos/tosca/custom_types/vmm.yaml b/xos/tosca/custom_types/vmm.yaml
index ae38c00..7f01059 100644
--- a/xos/tosca/custom_types/vmm.yaml
+++ b/xos/tosca/custom_types/vmm.yaml
@@ -92,7 +92,4 @@
                 type: string
                 required: false
                 description: Service specific ID opaque to XOS but meaningful to service
-            tenant_message:
-                type: string
-                required: false
 
diff --git a/xos/tosca/resources/vmmtenant.py b/xos/tosca/resources/vmmtenant.py
index f559fc7..1467edf 100644
--- a/xos/tosca/resources/vmmtenant.py
+++ b/xos/tosca/resources/vmmtenant.py
@@ -5,7 +5,7 @@
 class XOSVMMTenant(XOSResource):
     provides = "tosca.nodes.VMMTenant"
     xos_model = VMMTenant
-    copyin_props = ("tenant_message",)  
+    copyin_props = ()  
     name_field = None  
 
     def get_xos_args(self, throw_exception=True):
diff --git a/xos/vmm.xproto b/xos/vmm.xproto
index 45cb746..64bd937 100644
--- a/xos/vmm.xproto
+++ b/xos/vmm.xproto
@@ -12,5 +12,4 @@
 message VMMTenant (TenantWithContainer){
      option name = "VMMTenant";
      option verbose_name = "Virtual Mobility Management Tenant";
-     required string tenant_message = 1 [help_text = "Tenant Message to Display", max_length = 254, null = False, db_index = False, blank = False];
 }