[SEBA-478] Renaming xos_services in xos-services

Change-Id: I6d2a50bc92fda0fd39183ff0f12fc1a5d97faf81
diff --git a/VERSION b/VERSION
index f2b42fc..42a4ee5 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.2.13
+2.2.14
diff --git a/containers/chameleon/Dockerfile.chameleon b/containers/chameleon/Dockerfile.chameleon
index e2a5dc4..404cb00 100644
--- a/containers/chameleon/Dockerfile.chameleon
+++ b/containers/chameleon/Dockerfile.chameleon
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/chameleon
-FROM xosproject/xos-base:2.2.13
+FROM xosproject/xos-base:2.2.14
 
 # xos-base already has protoc and dependencies installed
 
diff --git a/containers/xos/Dockerfile.client b/containers/xos/Dockerfile.client
index 491acfc..da9bb41 100644
--- a/containers/xos/Dockerfile.client
+++ b/containers/xos/Dockerfile.client
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-client
-FROM xosproject/xos-libraries:2.2.13
+FROM xosproject/xos-libraries:2.2.14
 
 # Install XOS client
 COPY lib/xos-api /tmp/xos-api
diff --git a/containers/xos/Dockerfile.libraries b/containers/xos/Dockerfile.libraries
index 4c3a7c6..a005ea5 100644
--- a/containers/xos/Dockerfile.libraries
+++ b/containers/xos/Dockerfile.libraries
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-libraries
-FROM xosproject/xos-base:2.2.13
+FROM xosproject/xos-base:2.2.14
 
 # Add libraries
 COPY lib /opt/xos/lib
diff --git a/containers/xos/Dockerfile.synchronizer-base b/containers/xos/Dockerfile.synchronizer-base
index 8f1dc73..43761b3 100644
--- a/containers/xos/Dockerfile.synchronizer-base
+++ b/containers/xos/Dockerfile.synchronizer-base
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-synchronizer-base
-FROM xosproject/xos-client:2.2.13
+FROM xosproject/xos-client:2.2.14
 
 COPY xos/synchronizers/new_base /opt/xos/synchronizers/new_base
 COPY xos/xos/logger.py /opt/xos/xos/logger.py
diff --git a/containers/xos/Dockerfile.xos-core b/containers/xos/Dockerfile.xos-core
index d82a9c4..06e8b5f 100644
--- a/containers/xos/Dockerfile.xos-core
+++ b/containers/xos/Dockerfile.xos-core
@@ -13,13 +13,13 @@
 # limitations under the License.
 
 # xosproject/xos-core
-FROM xosproject/xos-libraries:2.2.13
+FROM xosproject/xos-libraries:2.2.14
 
 # Install XOS
 ADD xos /opt/xos
 ADD lib /opt/xos/lib
 
-RUN mkdir -p /opt/cord_profile /opt/xos_services /opt/xos_libraries \
+RUN mkdir -p /opt/cord_profile /opt/xos-services /opt/xos_libraries \
  && xosgenx --output /opt/xos/core/models --target django.xtarget --dest-extension py \
       --write-to-file model /opt/xos/core/models/core.xproto \
  && xosgenx --output /opt/xos/core/models --target django-security.xtarget --dest-file security.py \
diff --git a/docs/dev/grpc_api.md b/docs/dev/grpc_api.md
index 93ce856..30c854a 100644
--- a/docs/dev/grpc_api.md
+++ b/docs/dev/grpc_api.md
@@ -38,7 +38,7 @@
 ```shell
 mkdir -p ~/cord/sample_client
 cd ~/cord/sample_client
-xosgenx --target protoapi.xtarget --include-apps volt --include-apps rcord --include-apps att-workflow-driver --include-apps fabric-crossconnect  ~/cord/orchestration/xos/xos/core/models/core.xproto ~/cord/orchestration/xos_services/olt-service/xos/synchronizer/models/volt.xproto ~/cord/orchestration/xos_services/att-workflow-driver/xos/synchronizer/models/att-workflow-driver.xproto ~/cord/orchestration/xos_services/fabric-crossconnect/xos/synchronizer/models/fabric-crossconnect.xproto ~/cord/orchestration/profiles/rcord/xos/synchronizer/models/rcord.xproto > ~/cord/sample_client/seba.proto
+xosgenx --target protoapi.xtarget --include-apps volt --include-apps rcord --include-apps att-workflow-driver --include-apps fabric-crossconnect  ~/cord/orchestration/xos/xos/core/models/core.xproto ~/cord/orchestration/xos-services/olt-service/xos/synchronizer/models/volt.xproto ~/cord/orchestration/xos-services/att-workflow-driver/xos/synchronizer/models/att-workflow-driver.xproto ~/cord/orchestration/xos-services/fabric-crossconnect/xos/synchronizer/models/fabric-crossconnect.xproto ~/cord/orchestration/xos-services/rcord/xos/synchronizer/models/rcord.xproto > ~/cord/sample_client/seba.proto
 ```
 
 Note that it's necessary to supply the source xproto files that you're going to use. For this example, we've provided a list that includes popular SEBA services. We've also included the core xprotos, since they include necessary base classes for the services.
diff --git a/docs/dev/xosmigrate.md b/docs/dev/xosmigrate.md
index 324089b..ac8a189 100644
--- a/docs/dev/xosmigrate.md
+++ b/docs/dev/xosmigrate.md
@@ -20,20 +20,24 @@
 
 ## Generating Migrations
 
-Once the toolchain is available, you will be able to generate
-migrations for the services (or the core) using the `xos-migrate`
-command. Execute the command to see the available options:
+Once the toolchain is available, you will be able to generate migrations for
+the services (or the core) using the `xos-migrate` command. Execute the command
+to see the available options:
 
 ```bash
-usage: xos-migrate [-h] -s SERVICE_NAMES [-r REPO_ROOT] [--check] [-v]
+usage: xos-migrate [-h] -s SERVICE_NAMES [-r REPO_ROOT | -x XOS_ROOT]
+                   [--check] [-v]
 
 XOS Migrations
 
 optional arguments:
   -h, --help            show this help message and exit
   -r REPO_ROOT, --repo REPO_ROOT
-                        The location of the folder containing the CORD repo
-                        root (default to ~/cord)
+                        Path to the CORD repo root (defaults to '../..').
+                        Mutually exclusive with '--xos'.
+  -x XOS_ROOT, --xos XOS_ROOT
+                        Path to directory of the XOS repo. Incompatible with '
+                        --repo' and only works for core migrations.
   --check               Check if the migrations are generated for a given
                         service. Does not apply any change.
   -v, --verbose         increase log verbosity
@@ -41,7 +45,7 @@
 required arguments:
   -s SERVICE_NAMES, --service SERVICE_NAMES
                         The name of the folder containing the service in
-                        cord/orchestration/xos-services
+                        cord/orchestration/xos_services
 ```
 
 For example, if the code you want to migrate is in `~/Sites` and you
@@ -172,3 +176,10 @@
 ```shell
 xos-migrate -s fabric --check
 ```
+
+The XOS core can be checked in place (without the entire source tree checked
+out by the `repo` tool) with:
+
+```shell
+xos-migrate -x xos -s core --check
+```
diff --git a/docs/tutorials/example_service.md b/docs/tutorials/example_service.md
index b29c012..4fe15c1 100644
--- a/docs/tutorials/example_service.md
+++ b/docs/tutorials/example_service.md
@@ -31,7 +31,7 @@
 The result of preparing *ExampleService* for on-boarding is the following set
 of files, all located in the `xos` directory of the `exampleservice`
 repository. When checked out, these files live in the
-`CORD_ROOT/orchestration/xos_services/exampleservice` directory on
+`CORD_ROOT/orchestration/xos-services/exampleservice` directory on
 your local development machine.
 
 | Component | Source Code (https://github.com/opencord/exampleservice/) |
@@ -42,12 +42,6 @@
 | Model Policies | `xos/synchronizer/model_policies/model_policy_exampleserviceinstance.py` |
 | On-Boarding Spec | `xos/exampleservice-onboard.yaml`
 
-Earlier releases (3.0 and before) required additional files (mostly Python
-code) to on-board a service, including a REST API, a TOSCA API, and an Admin
-GUI. These components are now auto-generated from the models rather than coded
-by hand, although it is still possible to [extend the
-GUI](/xos-gui/developer/README.md).
-
 In addition to implementing these service-specific files, the final step to
 on-boarding a service requires you to modify an existing (or write a new)
 [service profile](/service-profiles.md).  This tutorial uses the existing
@@ -463,7 +457,7 @@
     exampleservice:
       type: tosca.nodes.ServiceController
       properties:
-          base_url: file:///opt/xos_services/exampleservice/xos/
+          base_url: file:///opt/xos-services/exampleservice/xos/
           # The following will concatenate with base_url automatically, if
           # base_url is non-null.
           private_key: file:///opt/xos/key_import/exampleservice_rsa
@@ -498,16 +492,16 @@
 In the following, we use `rcord.yml` as an illustrative example. There
 are potentially three sections of this file that need attention.
 
-First, modify the `xos_services` section to identify `exampleservice`
+First, modify the `xos-services` section to identify `exampleservice`
 as a service to include in the profile. Doing this effectively points
 the build system at the model and synchronizer specifications you've
 just defined.
 
 ```yaml
-xos_services:
+xos-services:
   ... (lines omitted)...
   - name: exampleservice
-    path: orchestration/xos_services/exampleservice
+    path: orchestration/xos-services/exampleservice
     keypair: exampleservice_rsa
     synchronizer: true
 ```
diff --git a/docs/tutorials/local_synchronizer_dev_loop.md b/docs/tutorials/local_synchronizer_dev_loop.md
index 08a08ca..faca68c 100644
--- a/docs/tutorials/local_synchronizer_dev_loop.md
+++ b/docs/tutorials/local_synchronizer_dev_loop.md
@@ -37,7 +37,7 @@
       - /home/user/cord_profile/node_key:/opt/cord_profile/node_key:ro
       - /home/user/cord/build/platform-install/credentials:/opt/xos/services/<service>/credentials:ro
       - /home/user/cord_profile/im_cert_chain.pem:/usr/local/share/ca-certificates/local_certs.crt:ro
-      - /home/user/cord/orchestration/xos_services/<service>/xos/synchronizer:/opt/xos/synchronizers/<service>
+      - /home/user/cord/orchestration/xos-services/<service>/xos/synchronizer:/opt/xos/synchronizers/<service>
 ```
 
 The important bits are the sleep command and the last volume
diff --git a/lib/xos-migrate/xosmigrate/main.py b/lib/xos-migrate/xosmigrate/main.py
index 8d76197..562ee38 100644
--- a/lib/xos-migrate/xosmigrate/main.py
+++ b/lib/xos-migrate/xosmigrate/main.py
@@ -290,7 +290,7 @@
     action="append",
     required=True,
     dest="service_names",
-    help="The name of the folder containing the service in cord/orchestration/xos_services"
+    help="The name of the folder containing the service in cord/orchestration/xos-services"
 )
 
 pathgroup = parser.add_mutually_exclusive_group()
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_diffs.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_diffs.py
index 9e0b9d9..20a46d5 100644
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_diffs.py
+++ b/lib/xos-synchronizer/xos-synchronizer-tests/test_diffs.py
@@ -23,7 +23,7 @@
 test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
 sync_lib_dir = os.path.join(test_path, "..", "xossynchronizer")
 xos_dir = os.path.join(test_path, "..", "..", "..", "xos")
-services_dir = os.path.join(xos_dir, "../../xos_services")
+services_dir = os.path.join(xos_dir, "../../xos-services")
 
 
 class TestDiffs(unittest.TestCase):
diff --git a/lib/xos-synchronizer/xossynchronizer/mock_modelaccessor_build.py b/lib/xos-synchronizer/xossynchronizer/mock_modelaccessor_build.py
index 1db6f26..600edd0 100644
--- a/lib/xos-synchronizer/xossynchronizer/mock_modelaccessor_build.py
+++ b/lib/xos-synchronizer/xossynchronizer/mock_modelaccessor_build.py
@@ -116,7 +116,7 @@
             raise Exception("Failed to autodiscovery repository tree")
 
     xos_dir = os.path.join(orchestration_dir, "xos", "xos")
-    services_dir = os.path.join(orchestration_dir, "xos_services")
+    services_dir = os.path.join(orchestration_dir, "xos-services")
 
     service_xprotos = []
     for (service_name, xproto_name) in services:
diff --git a/scripts/service_scaffold.sh b/scripts/service_scaffold.sh
index 918cab2..4cdec56 100755
--- a/scripts/service_scaffold.sh
+++ b/scripts/service_scaffold.sh
@@ -296,7 +296,7 @@
 
 if not os.path.exists(os.path.join(test_path, "new_base")):
     xos_dir = os.path.join(test_path, "../../../../../../orchestration/xos/xos")
-    services_dir = os.path.join(xos_dir, "../../xos_services")
+    services_dir = os.path.join(xos_dir, "../../xos-services")
 
 sys.path.append(xos_dir)
 sys.path.append(os.path.join(xos_dir, 'synchronizers', 'new_base'))
@@ -430,7 +430,7 @@
 
 if not os.path.exists(os.path.join(test_path, "new_base")):
     xos_dir = os.path.join(test_path, "../../../../../../orchestration/xos/xos")
-    services_dir = os.path.join(xos_dir, "../../xos_services")
+    services_dir = os.path.join(xos_dir, "../../xos-services")
 
 sys.path.append(xos_dir)
 sys.path.append(os.path.join(xos_dir, 'synchronizers', 'new_base'))
diff --git a/scripts/xproto_sanity_check.py b/scripts/xproto_sanity_check.py
index f977b28..4ccd7d3 100755
--- a/scripts/xproto_sanity_check.py
+++ b/scripts/xproto_sanity_check.py
@@ -21,7 +21,7 @@
 
 SCRIPT_DIR=os.path.dirname(os.path.realpath(__file__))
 BASE_DIR=os.path.join(SCRIPT_DIR,"..","..","..")
-SERVICES_DIR=os.path.join(BASE_DIR,"orchestration","xos_services")
+SERVICES_DIR=os.path.join(BASE_DIR,"orchestration","xos-services")
 CORE_XPROTO=os.path.join(BASE_DIR,"orchestration","xos","xos","core","models","core.xproto")
 TARGET=os.path.join(BASE_DIR,"orchestration","xos","lib","xos-genx","xosgenx","targets","fieldlist.xtarget")