diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | deployments/docker-compose.yml | 1 | ||||
-rw-r--r-- | docs/sampleCommands.rst | 88 | ||||
-rw-r--r-- | tox.ini | 2 | ||||
l--------- | vagrant/installer | 1 | ||||
-rwxr-xr-x | vagrant/installer.sh | 5 |
6 files changed, 69 insertions, 29 deletions
@@ -30,5 +30,6 @@ src/k8splugin/plugins/**/*.so vagrant/inventory/hosts.ini vagrant/inventory/group_vars/all.yml vagrant/config/pdf.yml +vagrant/sources.list *.retry *.vdi diff --git a/deployments/docker-compose.yml b/deployments/docker-compose.yml index 6ae7b4ea..5147d35a 100644 --- a/deployments/docker-compose.yml +++ b/deployments/docker-compose.yml @@ -26,6 +26,7 @@ services: - KUBE_CONFIG_DIR=/opt/kubeconfig - DATABASE_TYPE=consul - DATABASE_IP=consul-svr + - PLUGINS_DIR=/opt/multicloud/k8s depends_on: - "consul" volumes: diff --git a/docs/sampleCommands.rst b/docs/sampleCommands.rst index 2407b260..c635c250 100644 --- a/docs/sampleCommands.rst +++ b/docs/sampleCommands.rst @@ -17,7 +17,7 @@ Sample cURL commands POST **** -URL: `localhost:8081/v1/vnf_instances/cloudregion1/namespacetest` +URL: `localhost:8081/v1/vnf_instances/` Request Body ------------ @@ -26,6 +26,7 @@ Request Body { "cloud_region_id": "region1", + "namespace": "test-namespace", "csar_id": "uuid", "namespace": "test", "oof_parameters": [{ @@ -48,37 +49,68 @@ Expected Response .. code-block:: json { - "response": "Created Deployment:nginx-deployment" + "vnf_id": "52fdfc07", + "cloud_region_id": "cloudregion1", + "namespace": "test-namespace", + "vnf_components": { + "deployment": [ + "cloudregion1-test-namespace-52fdfc07-kubedeployment" + ], + "service": [ + "cloudregion1-test-namespace-52fdfc07-kubeservice" + ] + } } -The above POST request will download the following YAML file and run it on the Kubernetes cluster. - -.. code-block:: yaml - - apiVersion: apps/v1 - kind: Deployment - metadata: - name: nginx-deployment - labels: - app: nginx - spec: - replicas: 3 - selector: - matchLabels: - app: nginx - template: - metadata: - labels: - app: nginx - spec: - containers: - - name: nginx - image: nginx:1.7.9 - ports: - - containerPort: 80 - *** GET *** URL: `localhost:8081/v1/vnf_instances` + +Expected Response +----------------- + +.. code-block:: json + + { + "vnf_id_list": [ + "52fdfc07" + ] + } + +*** +GET +*** + +URL: `localhost:8081/v1/vnf_instances/cloudregion1/test-namespace/52fdfc07` + +Expected Response +----------------- + +.. code-block:: json + + { + "vnf_id": "52fdfc07", + "cloud_region_id": "cloudregion1", + "namespace": "test-namespace", + "vnf_components": { + "deployment": [ + "cloudregion1-test-namespace-52fdfc07-kubedeployment" + ], + "service": [ + "cloudregion1-test-namespace-52fdfc07-kubeservice" + ] + } + } + +*** +DELETE +*** + +URL: `localhost:8081/v1/vnf_instances/cloudregion1/test-namespace/52fdfc07` + +Expected Response +----------------- + +202 Accepted
\ No newline at end of file @@ -18,7 +18,7 @@ commands = bash -c "find {toxinidir} -not -path {toxinidir}/.tox/\* \ # E006 check for lines longer than 79 columns -print0 | xargs -0 bashate -v -iE006" bash -c "find {toxinidir} -not -path {toxinidir}/.tox/\* \ - -name \*.rst -type f -print0 | xargs -0 rstcheck" + -name \*.rst -type f -print0 | xargs -0 rstcheck --report warning" [testenv:docs] deps = sphinx diff --git a/vagrant/installer b/vagrant/installer new file mode 120000 index 00000000..2b6cb163 --- /dev/null +++ b/vagrant/installer @@ -0,0 +1 @@ +installer.sh
\ No newline at end of file diff --git a/vagrant/installer.sh b/vagrant/installer.sh index 29866a82..b4886f21 100755 --- a/vagrant/installer.sh +++ b/vagrant/installer.sh @@ -260,6 +260,11 @@ k8s_info_file=$krd_folder/k8s_info.log mkdir -p $log_folder # Install dependencies +# Setup proxy variables +if [ -f $krd_folder/sources.list ]; then + mv /etc/apt/sources.list /etc/apt/sources.list.backup + cp $krd_folder/sources.list /etc/apt/sources.list +fi apt-get update install_k8s install_addons |