Docs: Fix issue of the docs; Update 'sol0018' to 'sol018' 68/8568/2
authorZhang Rong(Jon) <rong.zhang@windriver.com>
Wed, 15 Jun 2022 09:07:29 +0000 (17:07 +0800)
committerZhang Rong(Jon) <rong.zhang@windriver.com>
Thu, 16 Jun 2022 04:11:05 +0000 (12:11 +0800)
1. user-guide when get the dmsIDs
2. Update 'sol0018' to 'sol018'

No issue ID

Signed-off-by: Zhang Rong(Jon) <rong.zhang@windriver.com>
Change-Id: Id570bb42a4c7f580b4223997a0039ef1bb72818e

docs/api.rst
docs/user-guide.rst
o2dms/api/dms_lcm_view.py
o2dms/api/dms_route.py
o2ims/domain/ocloud.py
o2ims/views/ocloud_route.py
o2ims/views/ocloud_view.py
tests/unit/test_ocloud.py

index 32c8f90..1b1e5aa 100644 (file)
@@ -877,7 +877,7 @@ Parameters
     :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
     :widths: 20, 15, 10, 10, 10, 20, 30
 
-        profile | query | No | string |  |  | DMS profile: value supports "sol0018"
+        profile | query | No | string |  |  | DMS profile: value supports "sol018"
         deploymentManagerID | path | Yes | string |  |  | ID of the deployment manager
 
 
index 6101c7f..5d64874 100644 (file)
@@ -294,7 +294,7 @@ with SMO.
 
       # Get all DMS ID, and print them with command
       dmsIDs=$(curl -s -X 'GET' \
-        'http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers' \
+        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers" \
         -H 'accept: application/json' | jq --raw-output '.[]["deploymentManagerId"]')
       for i in $dmsIDs;do echo ${i};done;
 
@@ -317,20 +317,20 @@ with SMO.
       CLUSTER_NAME="o2dmsk8s1" # set the cluster name
 
       K8S_SERVER=$(curl -s -X 'GET' \
-        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol0018" \
+        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol018" \
         -H 'accept: application/json' | jq --raw-output '.["profileData"]["cluster_api_endpoint"]')
       K8S_CA_DATA=$(curl -s -X 'GET' \
-        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol0018" \
+        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol018" \
         -H 'accept: application/json' | jq --raw-output '.["profileData"]["cluster_ca_cert"]')
 
       K8S_USER_NAME=$(curl -s -X 'GET' \
-        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol0018" \
+        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol018" \
         -H 'accept: application/json' | jq --raw-output '.["profileData"]["admin_user"]')
       K8S_USER_CLIENT_CERT_DATA=$(curl -s -X 'GET' \
-        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol0018" \
+        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol018" \
         -H 'accept: application/json' | jq --raw-output '.["profileData"]["admin_client_cert"]')
       K8S_USER_CLIENT_KEY_DATA=$(curl -s -X 'GET' \
-        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol0018" \
+        "http://${OAM_IP}:30205/o2ims_infrastructureInventory/v1/deploymentManagers/${dmsID}?profile=sol018" \
         -H 'accept: application/json' | jq --raw-output '.["profileData"]["admin_client_key"]')
 
 
index c9abac9..bb5c94d 100644 (file)
@@ -56,7 +56,7 @@ def deployment_manager_one(deploymentManagerId: str,
     # profile_data = result.pop("profile", None)
     # result['profileName'] = 'default'
 
-    # if "sol0018" == profile:
+    # if "sol018" == profile:
     #     result['profileName'] = profile
     #     result['profileData'] = profile_data
     # elif "file" == profile and result.hasattr("profile"):
index 032ebe9..f41d2f1 100644 (file)
@@ -33,8 +33,8 @@ def configure_api_route():
 # ----------  DeploymentManagers ---------- #
 @api_dms_lcm_v1.route("/<deploymentManagerID>")
 @api_dms_lcm_v1.param('deploymentManagerID', 'ID of the deployment manager')
-# @api_dms_lcm_v1.param('profile', 'DMS profile: value supports "sol0018"',
-#                       _in='query', default='sol0018')
+# @api_dms_lcm_v1.param('profile', 'DMS profile: value supports "sol018"',
+#                       _in='query', default='sol018')
 @api_dms_lcm_v1.response(404, 'Deployment manager not found')
 class DmsGetRouter(Resource):
 
index 996d82d..01ea29a 100644 (file)
@@ -46,7 +46,7 @@ class DeploymentManager(AgRoot, Serializer):
 
         if 'profile' in d and d['profile'] != '':
             d['profile'] = json.loads(d['profile'])
-        d['profileSupportList'] = ['default', 'sol0018']
+        d['profileSupportList'] = ['default', 'sol018']
 
         return d
 
index 3490072..6b6a3fc 100644 (file)
@@ -168,7 +168,7 @@ class DeploymentManagersListRouter(Resource):
 @api_ims_inventory_v1.route("/deploymentManagers/<deploymentManagerID>")
 @api_ims_inventory_v1.param('deploymentManagerID',
                             'ID of the deployment manager')
-@api_ims_inventory_v1.param('profile', 'DMS profile: value supports "sol0018"',
+@api_ims_inventory_v1.param('profile', 'DMS profile: value supports "sol018"',
                             _in='query')
 @api_ims_inventory_v1.response(404, 'Deployment manager not found')
 class DeploymentManagerGetRouter(Resource):
index e129b83..94d8601 100644 (file)
@@ -118,7 +118,7 @@ def deployment_manager_one(deploymentManagerId: str,
     profile_data = result.pop("profile", None)
     result['profileName'] = 'default'
 
-    if "sol0018" == profile:
+    if "sol018" == profile:
         result['profileName'] = profile
         result['deploymentManagementServiceEndpoint'] = \
             profile_data['cluster_api_endpoint']
index 1ae4f5e..dbfa65f 100644 (file)
@@ -289,8 +289,8 @@ def test_view_deployment_manager_one(mock_uow):
         'deploymentManagementServiceEndpoint')) == dms_endpoint
     assert deployment_manager_res.get('profile') is None
 
-    # profile sol0018
-    profileName = 'sol0018'
+    # profile sol018
+    profileName = 'sol018'
     cluster_endpoint = "https://test_k8s:6443"
     session.return_value.query.return_value.filter_by.return_value.first.\
         return_value.serialize.return_value['profile'] = {