Refactor vfc vnflcm code format 47/10047/2
authorying.yunlong <ying.yunlong@zte.com.cn>
Sat, 2 Sep 2017 02:33:19 +0000 (10:33 +0800)
committerying.yunlong <ying.yunlong@zte.com.cn>
Sat, 2 Sep 2017 02:36:43 +0000 (10:36 +0800)
Change-Id: Iae1a037ef19870c1afadb9a46cf8bd0848c07394
Issue-Id: VFC-237
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
16 files changed:
lcm/lcm/nf/__init__.py
lcm/lcm/nf/vnfs/const.py
lcm/lcm/nf/vnfs/swagger.json
lcm/lcm/nf/vnfs/tests/__init__.py
lcm/lcm/nf/vnfs/tests/test_vnf_cancel.py
lcm/lcm/nf/vnfs/tests/test_vnf_create.py
lcm/lcm/nf/vnfs/tests/test_vnf_query.py
lcm/lcm/nf/vnfs/views.py
lcm/lcm/nf/vnfs/vnf_cancel/__init__.py
lcm/lcm/nf/vnfs/vnf_cancel/delete_vnf_identifier.py
lcm/lcm/nf/vnfs/vnf_cancel/term_vnf.py
lcm/lcm/nf/vnfs/vnf_create/create_vnf_identifier.py
lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py
lcm/lcm/pub/aaiapi/aai.py
lcm/lcm/pub/exceptions.py
lcm/lcm/settings.py

index 650d17e..c7b6818 100644 (file)
@@ -10,4 +10,4 @@
 # 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.
\ No newline at end of file
+# limitations under the License.
index 3967eae..bb114e4 100644 (file)
@@ -18,6 +18,7 @@ VNF_STATUS = enum(NULL='null', INSTANTIATING="instantiating", INACTIVE='inactive
                   FAILED="failed", TERMINATING="terminating", SCALING="scaling", OPERATING="operating",
                   UPDATING="updating", HEALING="healing")
 
+# inst_req_data
 inst_req_data = {
     "flavourId": "flavour_1",
     "instantiationLevelId": "instantiationLevel_1",
@@ -83,6 +84,8 @@ inst_req_data = {
                         }]}
 }
 
+
+# vnfd_rawdata
 vnfd_rawdata = {
     "rawData": {
         "instance": {
@@ -350,7 +353,7 @@ vnfd_rawdata = {
     }
 }
 
-
+# vnfd_model_dict
 vnfd_model_dict = {
     'metadata': {
         'vendor': u'zte',
@@ -660,7 +663,8 @@ vnfd_model_dict = {
     ],
 }
 
-c1_data_get_tenant_id = {  # get_tenant_id
+# get_tenant_id
+c1_data_get_tenant_id = {
     "tenants": [
         {
             "id": "1",
@@ -668,6 +672,8 @@ c1_data_get_tenant_id = {  # get_tenant_id
         }
     ]
 }
+
+# create_volume
 c2_data_create_volume = {
     "id": "4bd3e9eb-cd8b-456a-8589-910836a0ab31",
     "name": "volume1",
@@ -682,7 +688,9 @@ c2_data_create_volume = {
     "type": None,
     "size": 40
 }
-c3_data_get_volume = {  # get_volume
+
+# get_volume
+c3_data_get_volume = {
     "status": "available",
     "name": "wangsong",
     "attachments": [
@@ -699,7 +707,9 @@ c3_data_get_volume = {  # get_volume
     "id": "4bd3e9eb-cd8b-456a-8589-910836a0ab31",
     "size": 40
 }
-c4_data_create_network = {  # create_network
+
+# create_network
+c4_data_create_network = {
     "returnCode": 0,
     "vimId": "11111",
     "vimName": "11111",
@@ -715,6 +725,8 @@ c4_data_create_network = {  # create_network
     "physicalNetwork": "ctrl",
     "routerExternal": False
 }
+
+# create_subnet
 c5_data_create_subnet = {
     "returnCode": 0,
     "vimId": "11111",
@@ -738,6 +750,8 @@ c5_data_create_subnet = {
     ],
     "hostRoutes": []
 }
+
+# create_ports
 c6_data_create_port = {
     "returnCode": 0,
     "vimId": "11111",
@@ -755,6 +769,8 @@ c6_data_create_port = {
     "vnicType": "normal",
     "securityGroups": ""
 }
+
+# create_flavor
 c7_data_create_flavor ={
     "returnCode": 0,
     "vimId": "11111",
@@ -771,6 +787,7 @@ c7_data_create_flavor ={
     "extraSpecs": "testtt"
 }
 
+# list_image
 c8_data_list_image = {
     "vimid": "",
     "vimname": "",
@@ -783,6 +800,8 @@ c8_data_list_image = {
         }
     ]
 }
+
+# create_vm
 c9_data_create_vm = {
     "returnCode": 1,
     "id": "3c9eebdbbfd345658269340b9ea6fb73",
@@ -800,6 +819,8 @@ c9_data_create_vm = {
     "serverGroup": "fdvfdv",
     "status": "ACTIVE"
 }
+
+# get_vm
 c10_data_get_vm = {
     "returnCode": 1,
     "id": "3c9eebdbbfd345658269340b9ea6fb73",
index ce8ae68..4c9c8dd 100644 (file)
             }
         }
     }
-}
\ No newline at end of file
+}
index 650d17e..c7b6818 100644 (file)
@@ -10,4 +10,4 @@
 # 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.
\ No newline at end of file
+# limitations under the License.
index 8cdfb7f..4f27cee 100644 (file)
@@ -1,16 +1,17 @@
-# # Copyright 2017 ZTE Corporation.
-# #
-# # 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.
+# Copyright 2017 ZTE Corporation.
+#
+# 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.
+
 import json
 import uuid
 
index d4d5d77..aebfdb3 100644 (file)
@@ -11,6 +11,7 @@
 # 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.
+
 import json
 import uuid
 
index 5141ff8..7f21d47 100644 (file)
@@ -11,6 +11,7 @@
 # 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.test import TestCase, Client
 from rest_framework import status
 
index 8b026e5..1062d3a 100644 (file)
@@ -11,6 +11,7 @@
 # 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.
+
 import json
 import logging
 import os
index 650d17e..c7b6818 100644 (file)
@@ -10,4 +10,4 @@
 # 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.
\ No newline at end of file
+# limitations under the License.
index 91d9208..eede66f 100644 (file)
@@ -11,6 +11,7 @@
 # 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.
+
 import logging
 
 from lcm.pub.aaiapi.aai import delete_vnf
index 8b17fd2..b9a5e66 100644 (file)
@@ -11,6 +11,7 @@
 # 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.
+
 import json
 import logging
 import traceback
index a91c8d0..d801a26 100644 (file)
@@ -11,6 +11,7 @@
 # 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.
+
 import json
 import logging
 import uuid
index d242bd8..5ad002e 100644 (file)
@@ -11,6 +11,7 @@
 # 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.
+
 import json
 import logging
 import traceback
index a70a598..632e4f3 100644 (file)
@@ -11,6 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
 # See the License for the specific language governing permissions and\r
 # limitations under the License.\r
+\r
 import json\r
 import logging\r
 \r
index ac7b0c6..274c0d0 100644 (file)
@@ -14,4 +14,4 @@
 
 
 class NFLCMException(Exception):
-    pass
\ No newline at end of file
+    pass
index 631ada8..5583c4c 100644 (file)
@@ -129,6 +129,7 @@ LOGGING = {
 if 'test' in sys.argv:
     from lcm.pub.config import config
     config.REG_TO_MSB_WHEN_START = False
+
     DATABASES = {}
     DATABASES['default'] = {
         'ENGINE': 'django.db.backends.sqlite3',