epc-as-a-service functionality added

Change-Id: I4641f3dc885e3dd1c7a2950b9e7099b1aed42545
diff --git a/xos/models.py b/xos/models.py
index 4da52cb..a2924ca 100644
--- a/xos/models.py
+++ b/xos/models.py
@@ -16,13 +16,16 @@
 from xos.exceptions import *
 from sets import Set
 from xos.config import Config
-from django.contrib.contenttypes.models import ContentType
-from django.contrib.contenttypes.fields import GenericForeignKey
 
 class VPGWUService(VPGWUService_decl):
    class Meta:
         proxy = True 
 
+   def create_tenant(self, **kwargs):
+       t = VPGWUTenant(kind="vEPC", provider_service=self, connect_method="na", **kwargs)
+       t.save()
+       return t
+
 class VPGWUTenant(VPGWUTenant_decl):
    class Meta:
         proxy = True 
@@ -37,6 +40,13 @@
        super(VPGWUTenant, self).__init__(*args, **kwargs)
 
    def save(self, *args, **kwargs):
+       if not self.creator:
+           if not getattr(self, "caller", None):
+               raise XOSProgrammingError("VPGWUTenant's self.caller was not set")
+           self.creator = self.caller
+           if not self.creator:
+               raise XOSProgrammingError("VPGWUTenant's self.creator was not set")
+
        # Update the instance that was created for this tenant
        super(VPGWUTenant, self).save(*args, **kwargs)
        model_policy_vpgwutenant(self.pk)   
diff --git a/xos/tosca/custom_types/vpgwu.m4 b/xos/tosca/custom_types/vpgwu.m4
index b94b377..5e90bd6 100644
--- a/xos/tosca/custom_types/vpgwu.m4
+++ b/xos/tosca/custom_types/vpgwu.m4
@@ -22,12 +22,3 @@
             CORD - The vPGWU Tenant
         properties:
             xos_base_tenant_props
-            display_message:
-                type: string
-                required: false
-            s5s8_pgw_tag:
-                type: string
-                required: false
-            image_name:
-                type: string
-                required: false
diff --git a/xos/tosca/custom_types/vpgwu.yaml b/xos/tosca/custom_types/vpgwu.yaml
index af366e8..cb4c0a9 100644
--- a/xos/tosca/custom_types/vpgwu.yaml
+++ b/xos/tosca/custom_types/vpgwu.yaml
@@ -90,12 +90,3 @@
                 type: string
                 required: false
                 description: Service specific ID opaque to XOS but meaningful to service
-            display_message:
-                type: string
-                required: false
-            s5s8_pgw_tag:
-                type: string
-                required: false
-            image_name:
-                type: string
-                required: false
diff --git a/xos/tosca/resources/vpgwutenant.py b/xos/tosca/resources/vpgwutenant.py
index 06cbd42..8aa3033 100644
--- a/xos/tosca/resources/vpgwutenant.py
+++ b/xos/tosca/resources/vpgwutenant.py
@@ -6,7 +6,7 @@
     provides = "tosca.nodes.VPGWUTenant"
     xos_model = VPGWUTenant
     name_field = None
-    copyin_props = ["s5s8_pgw_tag", "display_message", "image_name"]
+    copyin_props = ()
 
     def get_xos_args(self, throw_exception=True):
         args = super(XOSVPGWUTenant, self).get_xos_args()
diff --git a/xos/vpgwu.xproto b/xos/vpgwu.xproto
index f16e628..5c1c171 100644
--- a/xos/vpgwu.xproto
+++ b/xos/vpgwu.xproto
@@ -12,7 +12,4 @@
 message VPGWUTenant (TenantWithContainer) {
     option name = "VPGWUTenant";
     option verbose_name = "Virtual Packet Gateway -- User Plane Tenant";
-    optional string display_message = 1 [db_index = False, max_length = 1024, null = True, blank = False, default = "New vPGWU Component"];
-    optional string s5s8_pgw_tag = 2 [db_index = False, max_length = 1024, null = True, content = "stripped", blank = False, default = "300"];
-    optional string image_name = 3 [db_index = False, max_length = 1024, null = True, content = "stripped", blank = False, default = "default"];
 }