[SEBA-526] Adding --xos-dir and --services-dir to xos-migrate cli options

Change-Id: Ic9b9528603427ac811a134df6fc19292a5a42b0b
diff --git a/docs/Makefile b/docs/Makefile
index 60b3b5f..0cd84bd 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -15,12 +15,12 @@
 LINT_STYLE ?= mdl_relaxed.rb
 
 serve: setup
-	gitbook serve
+	gitbook serve --log=debug --debug
 
 build: setup
 	gitbook build
 
-setup: xos-gui xos-tosca kubernetes openstack onos simpleexampleservice exampleservice
+setup:
 	gitbook init
 	gitbook install
 
@@ -37,29 +37,6 @@
 	@echo "---"
 	mdl -s $(LINT_STYLE) `find -L . ! -path "./_book/*" ! -path "./node_modules/*" -name "*.md"`
 
-# link directories that contain other documentation
-xos-gui:
-	ln -s ../../xos-gui/docs xos-gui
-
-xos-tosca:
-	ln -s ../../xos-tosca/docs xos-tosca
-
-kubernetes:
-	ln -s ../../xos-services/kubernetes-service/docs kubernetes
-
-openstack:
-	ln -s ../../xos-services/openstack/docs openstack
-
-onos:
-	ln -s ../../xos-services/onos-service/docs onos
-
-exampleservice:
-	ln -s ../../xos-services/exampleservice/docs exampleservice
-
-simpleexampleservice:
-	ln -s ../../xos-services/simpleexampleservice/docs simpleexampleservice
-
-
 # HOW TO
 # - load the virtual env (https://guide.opencord.org/xos/dev/local_env.html)
 # - run `make`
@@ -91,4 +68,3 @@
 	rm -rf $(GENERATED_DOCS)
 	rm -rf _book
 	rm -rf node_modules
-	rm -rf xos xos-gui xos-tosca kubernetes openstack onos simpleexampleservice exampleservice
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
index 84860ec..9580352 100644
--- a/docs/SUMMARY.md
+++ b/docs/SUMMARY.md
@@ -19,10 +19,10 @@
     * [Tutorial](tutorials/basic_synchronizer.md)
     * [XOS Shell (xossh)](dev/xossh.md)
 * [Platform Services](platform.md)
-    * [Kubernetes](kubernetes/kubernetes-service.md)
-    * [OpenStack](openstack/openstack-service.md)
-    * [ONOS](onos/README.md)
+    * [Kubernetes](./external_content/kubernetes.md)
+    * [OpenStack](./external_content/openstack.md)
+    * [ONOS](./external_content/onos.md)
 * [Example Services](examples.md)
-    * [Simple Example Service](simpleexampleservice/simple-example-service.md)
-    * [Example Service](exampleservice/example-service.md)
+    * [Simple Example Service](./external_content/simpleexampleservice.md)
+    * [Example Service](./external_content/exampleservice.md)
 
diff --git a/docs/dev/xosmigrate.md b/docs/dev/xosmigrate.md
index ac8a189..cce44ef 100644
--- a/docs/dev/xosmigrate.md
+++ b/docs/dev/xosmigrate.md
@@ -25,8 +25,8 @@
 to see the available options:
 
 ```bash
-usage: xos-migrate [-h] -s SERVICE_NAMES [-r REPO_ROOT | -x XOS_ROOT]
-                   [--check] [-v]
+usage: xos-migrate [-h] -s SERVICE_NAMES [-r REPO_ROOT] [-x XOS_ROOT]
+                   [--services-dir SERVICES_ROOT] [--check] [-v]
 
 XOS Migrations
 
@@ -35,9 +35,13 @@
   -r REPO_ROOT, --repo REPO_ROOT
                         Path to the CORD repo root (defaults to '../..').
                         Mutually exclusive with '--xos'.
-  -x XOS_ROOT, --xos XOS_ROOT
+  -x XOS_ROOT, --xos-dir XOS_ROOT
                         Path to directory of the XOS repo. Incompatible with '
-                        --repo' and only works for core migrations.
+                        --repo'.
+  --services-dir SERVICES_ROOT
+                        Path to directory of the XOS services root.
+                        Incompatible with '--repo'.Note that all the services
+                        repo needs to be siblings
   --check               Check if the migrations are generated for a given
                         service. Does not apply any change.
   -v, --verbose         increase log verbosity
@@ -45,7 +49,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
@@ -53,9 +57,15 @@
 following command:
 
 ```bash
-xos-migrate -r ~/Sites -s core -s fabric
+xos-migrate -r ~/Sites/cord -s core -s fabric
 ```
 
+> NOTE:
+> The command above is equivalent to:
+> ```bash
+> xos-migrate --xos-dir ~/Sites/cord/orchestration/xos --services-dir ~/Sites/cord/orchestration/xos-services/ -s core -s fabric
+> ```
+
 If no migrations were present for your service, you will see a new
 folder `migrations` (a sibling of `models`) that contains the file
 `0001-initial.py`. If the service already had migrations you will see
diff --git a/docs/examples.md b/docs/examples.md
index 170be7e..1d23cc7 100644
--- a/docs/examples.md
+++ b/docs/examples.md
@@ -3,5 +3,5 @@
 This section describes two example services that have been on-boarded
 into XOS.
 
-* [Simple Example Service](simpleexampleservice/simple-example-service.md): Runs a web server in a Kubernetes-managed pod.
-* [Example Service](exampleservice/example-service.md): Runs a web server in an OpenStack-managed VM.
+* [Simple Example Service](./external_content/simpleexampleservice.md): Runs a web server in a Kubernetes-managed pod.
+* [Example Service](./external_content/exampleservice.md): Runs a web server in an OpenStack-managed VM.
diff --git a/docs/external_content/exampleservice.md b/docs/external_content/exampleservice.md
new file mode 100644
index 0000000..2bfd2cf
--- /dev/null
+++ b/docs/external_content/exampleservice.md
@@ -0,0 +1 @@
+{% include git+https://github.com/opencord/exampleservice.git/docs/example-service.md" %}
diff --git a/docs/external_content/kubernetes.md b/docs/external_content/kubernetes.md
new file mode 100644
index 0000000..0f332e9
--- /dev/null
+++ b/docs/external_content/kubernetes.md
@@ -0,0 +1 @@
+{% include "git+https://github.com/opencord/kubernetes-service.git/docs/kubernetes-service.md" %}
diff --git a/docs/external_content/onos.md b/docs/external_content/onos.md
new file mode 100644
index 0000000..9d4d282
--- /dev/null
+++ b/docs/external_content/onos.md
@@ -0,0 +1 @@
+{% include "git+https://github.com/opencord/onos-service.git/docs/README.md" %}
diff --git a/docs/external_content/openstack.md b/docs/external_content/openstack.md
new file mode 100644
index 0000000..13d832c
--- /dev/null
+++ b/docs/external_content/openstack.md
@@ -0,0 +1 @@
+{% include "git+https://github.com/opencord/openstack.git/docs/openstack-service.md" %}
diff --git a/docs/external_content/simpleexampleservice.md b/docs/external_content/simpleexampleservice.md
new file mode 100644
index 0000000..86de35d
--- /dev/null
+++ b/docs/external_content/simpleexampleservice.md
@@ -0,0 +1 @@
+{% include "git+https://github.com/opencord/simpleexampleservice.git/docs/simple-example-service.md" %}
diff --git a/docs/mdl_relaxed.rb b/docs/mdl_relaxed.rb
index bebc671..26076a1 100644
--- a/docs/mdl_relaxed.rb
+++ b/docs/mdl_relaxed.rb
@@ -51,3 +51,9 @@
 
 # Gitbook won't care about multiple blank lines
 exclude_rule 'MD012'
+
+# Gitbook does not care about bare URLs
+exclude_rule 'MD034'
+
+# This is not true in case of "includes" placeholder
+exclude_rule 'MD041'
\ No newline at end of file
diff --git a/docs/platform.md b/docs/platform.md
index 7176cb4..109b1b1 100644
--- a/docs/platform.md
+++ b/docs/platform.md
@@ -9,7 +9,7 @@
 than service extensions. This section describes three example platform
 services in more detail:
 
-* [Kubernetes](kubernetes/kubernetes-service.md)
-* [OpenStack](openstack/openstack-service.md)
-* [ONOS](onos/README.md)
+* [Kubernetes](./external_content/kubernetes.md)
+* [OpenStack](./external_content/openstack.md)
+* [ONOS](./external_content/onos.md)