Revert the command name change 80/94580/2
authorKanagaraj M <mkr1481@gmail.com>
Thu, 29 Aug 2019 12:37:57 +0000 (18:07 +0530)
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Tue, 3 Sep 2019 09:34:50 +0000 (15:04 +0530)
Issue-ID: CLI-166

Change-Id: Ie933c02c74b02420745870716e756299020a849f
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
.gitignore
framework/src/test/java/org/onap/cli/fw/utils/ProcessRunnerTest.java
products/onap-dublin/features/integration/src/main/resources/open-cli-schema/vnf-tosca-provision-dublin-schema.yaml
products/onap-dublin/features/integration/src/main/resources/script/vnf-tosca-provision.py
products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-create-schema.yaml

index a033253..1011c3b 100644 (file)
@@ -5,6 +5,7 @@ data/
 build/
 dist/
 ocomp.egg-info/
+.pydevproject
 .project
 .settings
 .classpath
index 2e5b2ab..6d7ebbf 100644 (file)
@@ -39,7 +39,7 @@ public class ProcessRunnerTest {
     public void testStreamToString() throws IOException {
         InputStream stubInputStream = IOUtils.toInputStream("Test stream", "UTF-8");
         String out = processRunner.streamToString(stubInputStream);
-        Assert.assertEquals("Test stream\n", out);
+        Assert.assertEquals("Test stream", out.trim());
     }
 
 }
index ecc629c..e7c509a 100644 (file)
@@ -17,11 +17,12 @@ name: vnf-tosca-provision
 description: |
   ONAP TOSCA VNF validation using ONAP CLI and Open Command Platform (OCOMP)
 
-  This command runs in 4 mode:
+  This command runs in 5 mode:
   1. setup:    Create requires Vendor, Service Subscription and VNF cloud in ONAP
   2. standup:  From the given VSP csar, VNF csar and NS csar, it creates VF Model, NS Model and NS service
   3. cleanup:  Remove those entries provided in onap-objects parameter
-  4. validate: Run setup -> standup -> cleanup
+  4. provision:Run setup -> standup
+  5. validate: Run setup -> standup -> cleanup
 
   On every execution, it reports the ONAP managed object's ids in result onap-objects attribute. so
   if requires, these attribute value could be passed in input parameter onap-objects on subsequent
@@ -85,7 +86,7 @@ description: |
 
   e. Verify these details once by typing 'set'
 
-  e. Exit from the interactive console by typing 'exit'
+  f. Exit from the interactive console by typing 'exit'
 
   2. Setup SDC consumer
     oclip --product onap-dublin --profile onap-dublin sdc-consumer-create --consumer-name ocomp
@@ -138,12 +139,12 @@ parameters:
     is_optional: true
     default_value: {}
   - name: mode
-    description: setup or standup or cleanup
+    description: setup or standup or cleanup or provision or validate
     type: string
     short_option: Y
     long_option: mode
     is_optional: true
-    default_value: validate
+    default_value: checkup
   - name: vnf-name
     description: VNF Name
     type: string
index 6dc7310..40f00a7 100644 (file)
@@ -619,8 +619,9 @@ if __name__ == '__main__':
                         '\ncleanup - Remove the ONAP objects which are either created during \nsetup and standup phase or provided by the user in result-json file ' \
                                    '\nCAUTION: If required, do not provide the existing ONAP object ids \nin result-json while doing the cleanup, to avoid them getting deleted.'\
                         '\ncheckup - Check the deployment weather OCOMP is working properly or not' \
+                        '\nprovision - Run thru setup -> standup' \
                         '\nvalidate -  run thru setup -> standup -> cleanup modes for end to end vnf validation',
-                                   choices=('setup', 'standup', 'cleanup', 'checkup', 'validate'))
+                                   choices=('setup', 'standup', 'cleanup', 'checkup', 'provision', 'validate'))
 
     args = parser.parse_args()
     print (args)
@@ -713,6 +714,9 @@ if __name__ == '__main__':
         elif mode == 'checkup':
             onap.ocomp.product = 'open-cli'
             onap.ocomp.run(command='schema-list', params={'product': 'open-cli'})
+        elif mode == 'provision':
+           _setup()
+           _standup()
         elif mode == 'validate':
            _setup()
            _standup()