[CORD-1957] Scaffholding vENB service

Change-Id: I8159b2e1e89d4cc1bf9c6a4c4e88f30ac227d594
(cherry picked from commit 23e6760588b6ecc7b835e0762909a7eec585e5a0)
diff --git a/xos/models/attic/header.py b/xos/models/attic/header.py
new file mode 100644
index 0000000..ad5bb33
--- /dev/null
+++ b/xos/models/attic/header.py
@@ -0,0 +1,18 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
+
+from django.db import models
+from core.models import ServiceInstance
+from django.db.models import *
+from core.models.xosbase import StrippedCharField
diff --git a/xos/models/header.py b/xos/models/header.py
new file mode 120000
index 0000000..721b5c0
--- /dev/null
+++ b/xos/models/header.py
@@ -0,0 +1 @@
+attic/header.py
\ No newline at end of file
diff --git a/xos/models/venb.xproto b/xos/models/venb.xproto
new file mode 100644
index 0000000..413edea
--- /dev/null
+++ b/xos/models/venb.xproto
@@ -0,0 +1,10 @@
+option name = "vENB";
+option app_label = "venb";
+
+message VENBService (Service){
+    option verbose_name = "Virtual eNodeB Service";
+}
+
+message VENBServiceInstance (TenantWithContainer){
+    option verbose_name = "Virtual eNodeB Service Instance";
+}
diff --git a/xos/synchronizer/Dockerfile.synchronizer b/xos/synchronizer/Dockerfile.synchronizer
new file mode 100644
index 0000000..bb904ce
--- /dev/null
+++ b/xos/synchronizer/Dockerfile.synchronizer
@@ -0,0 +1,55 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# xosproject/venb-synchronizer
+FROM xosproject/xos-synchronizer-base:candidate
+
+COPY . /opt/xos/synchronizers/venb
+
+ENTRYPOINT []
+
+WORKDIR "/opt/xos/synchronizers/venb"
+
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=venb-synchronizer
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
+ARG org_opencord_component_chameleon_version=unknown
+ARG org_opencord_component_chameleon_vcs_url=unknown
+ARG org_opencord_component_chameleon_vcs_ref=unknown
+ARG org_opencord_component_xos_version=unknown
+ARG org_opencord_component_xos_vcs_url=unknown
+ARG org_opencord_component_xos_vcs_ref=unknown
+
+LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
+      org.label-schema.name=$org_label_schema_name \
+      org.label-schema.version=$org_label_schema_version \
+      org.label-schema.vcs-url=$org_label_schema_vcs_url \
+      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
+      org.label-schema.build-date=$org_label_schema_build_date \
+      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
+      org.opencord.component.chameleon.version=$org_opencord_component_chameleon_version \
+      org.opencord.component.chameleon.vcs-url=$org_opencord_component_chameleon_vcs_url \
+      org.opencord.component.chameleon.vcs-ref=$org_opencord_component_chameleon_vcs_ref \
+      org.opencord.component.xos.version=$org_opencord_component_xos_version \
+      org.opencord.component.xos.vcs-url=$org_opencord_component_xos_vcs_url \
+      org.opencord.component.xos.vcs-ref=$org_opencord_component_xos_vcs_ref
+
+CMD bash -c "cd /opt/xos/synchronizers/venb; ./run.sh"
diff --git a/xos/synchronizer/model-deps b/xos/synchronizer/model-deps
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/xos/synchronizer/model-deps
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/xos/synchronizer/model_policies/model_policy_venbserviceinstance.py b/xos/synchronizer/model_policies/model_policy_venbserviceinstance.py
new file mode 100644
index 0000000..ff9efbf
--- /dev/null
+++ b/xos/synchronizer/model_policies/model_policy_venbserviceinstance.py
@@ -0,0 +1,21 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
+
+from synchronizers.new_base.modelaccessor import *
+from synchronizers.new_base.policy import Policy
+from synchronizers.new_base.model_policies.model_policy_tenantwithcontainer import TenantWithContainerPolicy
+from synchronizers.new_base.exceptions import *
+
+class VENBServiceInstancePolicy(TenantWithContainerPolicy):
+    model_name = "VENBServiceInstance"
diff --git a/xos/synchronizer/run.sh b/xos/synchronizer/run.sh
new file mode 100755
index 0000000..506ffcd
--- /dev/null
+++ b/xos/synchronizer/run.sh
@@ -0,0 +1,17 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+python venb-synchronizer.py
diff --git a/xos/synchronizer/steps/.gitignore b/xos/synchronizer/steps/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/xos/synchronizer/steps/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file
diff --git a/xos/synchronizer/venb-synchronizer.py b/xos/synchronizer/venb-synchronizer.py
new file mode 100644
index 0000000..52cbc3d
--- /dev/null
+++ b/xos/synchronizer/venb-synchronizer.py
@@ -0,0 +1,36 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+#!/usr/bin/env python
+
+# Runs the standard XOS synchronizer
+
+import importlib
+import os
+import sys
+from xosconfig import Config
+
+config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/venb_config.yaml')
+
+print config_file
+
+Config.init(config_file, 'synchronizer-config-schema.yaml')
+
+synchronizer_path = os.path.join(os.path.dirname(
+    os.path.realpath(__file__)), "../../synchronizers/new_base")
+sys.path.append(synchronizer_path)
+mod = importlib.import_module("xos-synchronizer")
+mod.main()
diff --git a/xos/synchronizer/venb_config.yaml b/xos/synchronizer/venb_config.yaml
new file mode 100644
index 0000000..54d943e
--- /dev/null
+++ b/xos/synchronizer/venb_config.yaml
@@ -0,0 +1,24 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+name: venb-synchronizer
+accessor:
+  username: xosadmin@opencord.org
+  password: "@/opt/xos/services/venb/credentials/xosadmin@opencord.org"
+dependency_graph: "/opt/xos/synchronizers/venb/model-deps"
+steps_dir: "/opt/xos/synchronizers/venb/steps"
+sys_dir: "/opt/xos/synchronizers/venb/sys"
+model_policies_dir: "/opt/xos/synchronizers/venb/model_policies"
\ No newline at end of file
diff --git a/xos/venb-onboard.yaml b/xos/venb-onboard.yaml
new file mode 100644
index 0000000..0118742
--- /dev/null
+++ b/xos/venb-onboard.yaml
@@ -0,0 +1,32 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard rcord models
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+    servicecontroller#venb:
+      type: tosca.nodes.ServiceController
+      properties:
+          base_url: file:///opt/cord/orchestration/xos_services/venb/xos/
+          # The following will concatenate with base_url automatically, if
+          # base_url is non-null.
+          xproto: models/