CORD-2509 migrate vspgwu service from static to dynamic load

Change-Id: Ieaedb57f4ab97829a73355714c43558a23294993
diff --git a/xos/synchronizer/models/vspgwu.xproto b/xos/synchronizer/models/vspgwu.xproto
new file mode 100644
index 0000000..a703f33
--- /dev/null
+++ b/xos/synchronizer/models/vspgwu.xproto
@@ -0,0 +1,26 @@
+option name = "vspgwu";
+option app_label = "vspgwu";
+
+message VSPGWUService (Service){
+    option verbose_name = "Virtual Serving Gateway User Plane Service";
+}
+
+message VSPGWUVendor (XOSBase){
+    option verbose_name = "Virtual Serving Gateway User Plane Vendor";
+
+    required string name = 1 [help_text = "vendor name", max_length = 32, null = False, db_index = False, blank = False]; 
+    required manytoone image->Image:+ = 2 [help_text = "select image for this vendor", db_index = True, null = False, blank = False];
+    required manytoone flavor->Flavor:+ = 3 [help_text = "select openstack flavor for vendor image", db_index = True, null = False, blank = False];
+}
+
+message VSPGWUTenant (TenantWithContainer){
+    option verbose_name = "Virtual Serving Gateway User Plane Service Instance";
+    option owner_class_name="VSPGWUService";
+
+    optional manytoone vspgwu_vendor->VSPGWUVendor:vendor_tenants = 1 [help_text = "select vendor of choice, leave blank for slice default", db_index = True, null = True, blank = True];
+    optional string enodeb_ip_addr = 2 [help_text = "external eNodeB IP address (for 5.0)", default = "127.0.0.1", max_length = 32, null = True, db_index = False, blank = True];
+    optional string enodeb_mac_addr = 3 [help_text = "external eNodeB MAC address (for 5.0)", default = "11:11:11:11:11:11", max_length = 32, null = True, db_index = False, blank = True];
+    optional string appserver_ip_addr = 4 [help_text = "external app server IP address (for 5.0)", default = "127.0.0.1", max_length = 32, null = True, db_index = False, blank = True];
+    optional string appserver_mac_addr = 5 [help_text = "external app server MAC address (for 5.0)", default = "11:11:11:11:11:11", max_length = 32, null = True, db_index = False, blank = True];
+}
+
diff --git a/xos/synchronizer/vspgwu_config.yaml b/xos/synchronizer/vspgwu_config.yaml
index c4d8456..5c7d0fb 100644
--- a/xos/synchronizer/vspgwu_config.yaml
+++ b/xos/synchronizer/vspgwu_config.yaml
@@ -13,14 +13,19 @@
 # limitations under the License.
 
 
-name: vspgwu-synchronizer
+name: vspgwu
 accessor:
   username: xosadmin@opencord.org
   password: "@/opt/xos/services/vspgwu/credentials/xosadmin@opencord.org"
+required_models:
+  - VSPGWUService
+  - VSPGWUVendor
+  - VSPGWUTenant
 dependency_graph: "/opt/xos/synchronizers/vspgwu/model-deps"
 steps_dir: "/opt/xos/synchronizers/vspgwu/steps"
 sys_dir: "/opt/xos/synchronizers/vspgwu/sys"
 model_policies_dir: "/opt/xos/synchronizers/vspgwu/model_policies"
+models_dir: "/opt/xos/synchronizers/vspgwu/models"
 blueprints:
   - name: cord_5_0_blueprint
     graph:
diff --git a/xos/synchronizer/vspgwu_from_api_config b/xos/synchronizer/vspgwu_from_api_config
deleted file mode 100644
index 6e4f99a..0000000
--- a/xos/synchronizer/vspgwu_from_api_config
+++ /dev/null
@@ -1,20 +0,0 @@
-# Sets options for the synchronizer
-[observer]
-name=vspgwu
-dependency_graph=/opt/xos/synchronizers/vspgwu/model-deps
-steps_dir=/opt/xos/synchronizers/vspgwu/steps
-sys_dir=/opt/xos/synchronizers/vspgwu/sys
-#logfile=/var/log/xos_backend.log
-log_file=console
-log_level=debug
-pretend=False
-backoff_disabled=True
-save_ansible_output=True
-proxy_ssh=True
-proxy_ssh_key=/opt/cord_profile/node_key
-proxy_ssh_user=root
-accessor_kind=api
-accessor_password=@/opt/xos/services/vspgwu/credentials/xosadmin@opencord.org
-
-[networking]
-use_vtn=True