epc-as-a-service functionality added

Change-Id: I4cb79a3305ead02391f9c31faa0225d549618b78
diff --git a/xos/models.py b/xos/models.py
index 3c8ef23..d6fcdcd 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 VSGWUService(VSGWUService_decl):
    class Meta:
         proxy = True 
 
+   def create_tenant(self, **kwargs):
+       t = VSGWUTenant(kind="vEPC", provider_service=self, connect_method="na", **kwargs)
+       t.save()
+       return t
+
 class VSGWUTenant(VSGWUTenant_decl):
    class Meta:
         proxy = True 
@@ -34,6 +37,13 @@
        super(VSGWUTenant, self).__init__(*args, **kwargs)
 
    def save(self, *args, **kwargs):
+       if not self.creator:
+           if not getattr(self, "caller", None):
+               raise XOSProgrammingError("VSGWUTenant's self.caller was not set")
+           self.creator = self.caller
+           if not self.creator:
+               raise XOSProgrammingError("VSGWUTenant's self.creator was not set")
+
        super(VSGWUTenant, 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/vsgwu.m4 b/xos/tosca/custom_types/vsgwu.m4
index a0e4983..ef81b31 100644
--- a/xos/tosca/custom_types/vsgwu.m4
+++ b/xos/tosca/custom_types/vsgwu.m4
@@ -22,6 +22,3 @@
             VSGWU Tenant
         properties:
             xos_base_tenant_props
-            tenant_message:
-                type: string
-                required: false
diff --git a/xos/tosca/custom_types/vsgwu.yaml b/xos/tosca/custom_types/vsgwu.yaml
index 662794f..b231cf3 100644
--- a/xos/tosca/custom_types/vsgwu.yaml
+++ b/xos/tosca/custom_types/vsgwu.yaml
@@ -92,6 +92,3 @@
                 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/vsgwutenant.py b/xos/tosca/resources/vsgwutenant.py
index c44459a..6cad6d5 100644
--- a/xos/tosca/resources/vsgwutenant.py
+++ b/xos/tosca/resources/vsgwutenant.py
@@ -6,7 +6,7 @@
     provides = "tosca.nodes.VSGWUTenant"
     xos_model = VSGWUTenant
     name_field = "service_specific_id"
-    copyin_props = ("tenant_message",)
+    copyin_props = ()
 
     def get_xos_args(self, throw_exception=True):
         args = super(XOSVSGWUTenant, self).get_xos_args()
diff --git a/xos/vsgwu.xproto b/xos/vsgwu.xproto
index 46f0e72..1ffdf94 100644
--- a/xos/vsgwu.xproto
+++ b/xos/vsgwu.xproto
@@ -12,5 +12,4 @@
 message VSGWUTenant (TenantWithContainer){
      option name = "VSGWUTenant";
      option verbose_name = "Virtual Serving Gateway -- User Plane Tenant";
-     required string tenant_message = 1 [help_text = "Tenant Message to Display", max_length = 254, null = False, db_index = False, blank = False];
 }