aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/src/main/java/org/onap/cli/fw/input/ParameterType.java6
-rw-r--r--framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java2
-rw-r--r--framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java4
-rw-r--r--framework/src/test/resources/onap-cli-schema/sample-test1-schema-http.yaml2
-rw-r--r--framework/src/test/resources/onap-test-schema.yaml2
-rw-r--r--framework/src/test/resources/sample-test-invalid-schema-duplicate-longoption.yaml2
-rw-r--r--framework/src/test/resources/sample-test-invalid-schema-duplicate-name.yaml2
-rw-r--r--framework/src/test/resources/sample-test-invalid-schema-duplicate-shortoption.yaml2
-rw-r--r--framework/src/test/resources/sample-test-invalid-schema.yaml2
-rw-r--r--framework/src/test/resources/sample-test-schema-http.yaml4
-rw-r--r--framework/src/test/resources/sample-test-schema.yaml2
-rw-r--r--framework/src/test/resources/schema-validate-basic.yaml4
-rw-r--r--framework/src/test/resources/schema-validate-http.yaml4
-rw-r--r--framework/src/test/resources/schema-validate-invalidschematype.yaml4
-rw-r--r--main/src/test/resources/onap-cli-schema/sample-create-schema.yaml2
-rw-r--r--main/src/test/resources/sample-test-schema.yaml2
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/esr/ems/ems-delete-schema-1.1.yaml2
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml2
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml4
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml54
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml2
-rw-r--r--plugins/msb/src/main/resources/onap-cli-schema/microservice-create-schema.yaml3
-rw-r--r--plugins/msb/src/main/resources/onap-cli-schema/microservice-list-schema.yaml2
-rw-r--r--plugins/msb/src/main/resources/onap-cli-schema/microservice-show-schema.yaml2
-rw-r--r--plugins/msb/src/test/resources/service-list-schema.yaml2
25 files changed, 34 insertions, 85 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/input/ParameterType.java b/framework/src/main/java/org/onap/cli/fw/input/ParameterType.java
index 2625883e..791d7e42 100644
--- a/framework/src/main/java/org/onap/cli/fw/input/ParameterType.java
+++ b/framework/src/main/java/org/onap/cli/fw/input/ParameterType.java
@@ -30,7 +30,7 @@ public enum ParameterType {
/**
* YAML file.
*/
- YAML, STRING, TEXT, LONG,
+ YAML, STRING, TEXT, DIGIT,
/**
* URL location.
*/
@@ -52,8 +52,8 @@ public enum ParameterType {
return YAML;
} else if (STRING.name().equalsIgnoreCase(name)) {
return STRING;
- } else if (LONG.name().equalsIgnoreCase(name)) {
- return LONG;
+ } else if (DIGIT.name().equalsIgnoreCase(name)) {
+ return DIGIT;
} else if (URL.name().equalsIgnoreCase(name)) {
return URL;
} else if (BOOL.name().equalsIgnoreCase(name)) {
diff --git a/framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java b/framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java
index eef49ad8..0a5ad006 100644
--- a/framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java
@@ -30,7 +30,7 @@ public class ParameterTypeTest {
assertTrue(ParameterType.JSON.equals(ParameterType.get("json"))
&& ParameterType.YAML.equals(ParameterType.get("yaml"))
&& ParameterType.STRING.equals(ParameterType.get("string"))
- && ParameterType.LONG.equals(ParameterType.get("long"))
+ && ParameterType.DIGIT.equals(ParameterType.get("digit"))
&& ParameterType.URL.equals(ParameterType.get("url"))
&& ParameterType.BOOL.equals(ParameterType.get("bool"))
&& ParameterType.MAP.equals(ParameterType.get("map"))
diff --git a/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java b/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java
index ac1a6d33..d74f83a3 100644
--- a/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java
@@ -31,11 +31,11 @@ public class OnapCommandResultAttributeScopeTest {
att.setName("name");
att.setScope(OnapCommandResultAttributeScope.LONG);
att.setSecured(true);
- att.setType(ParameterType.LONG);
+ att.setType(ParameterType.DIGIT);
att.setValues(Collections.emptyList());
assertTrue("description".equals(att.getDescription()) && "name".equals(att.getName())
&& OnapCommandResultAttributeScope.LONG.equals(att.getScope())
- && ParameterType.LONG.equals(att.getType()) && att.getValues().isEmpty());
+ && ParameterType.DIGIT.equals(att.getType()) && att.getValues().isEmpty());
}
}
diff --git a/framework/src/test/resources/onap-cli-schema/sample-test1-schema-http.yaml b/framework/src/test/resources/onap-cli-schema/sample-test1-schema-http.yaml
index 55e9326c..21f863b6 100644
--- a/framework/src/test/resources/onap-cli-schema/sample-test1-schema-http.yaml
+++ b/framework/src/test/resources/onap-cli-schema/sample-test1-schema-http.yaml
@@ -41,7 +41,7 @@ parameters:
short_option: j
is_optional: false
- name: long-param
- type: long
+ type: digit
description: Onap long param
short_option: l
long_option: long-opt
diff --git a/framework/src/test/resources/onap-test-schema.yaml b/framework/src/test/resources/onap-test-schema.yaml
index ef86348e..814a138c 100644
--- a/framework/src/test/resources/onap-test-schema.yaml
+++ b/framework/src/test/resources/onap-test-schema.yaml
@@ -42,7 +42,7 @@ parameters:
short_option: j
is_optional: false
- name: long-param
- type: long
+ type: digit
description: Onap long param
short_option: l
long_option: long-opt
diff --git a/framework/src/test/resources/sample-test-invalid-schema-duplicate-longoption.yaml b/framework/src/test/resources/sample-test-invalid-schema-duplicate-longoption.yaml
index c7b018d3..04ec6f2d 100644
--- a/framework/src/test/resources/sample-test-invalid-schema-duplicate-longoption.yaml
+++ b/framework/src/test/resources/sample-test-invalid-schema-duplicate-longoption.yaml
@@ -41,7 +41,7 @@ parameters:
short_option: j
is_optional: false
- name: long-param
- type: long
+ type: digit
description: Onap long param
short_option: l
long_option: long-opt
diff --git a/framework/src/test/resources/sample-test-invalid-schema-duplicate-name.yaml b/framework/src/test/resources/sample-test-invalid-schema-duplicate-name.yaml
index f46a9759..c94a2387 100644
--- a/framework/src/test/resources/sample-test-invalid-schema-duplicate-name.yaml
+++ b/framework/src/test/resources/sample-test-invalid-schema-duplicate-name.yaml
@@ -48,7 +48,7 @@ parameters:
short_option: j
is_optional: false
- name: long-param
- type: long
+ type: digit
description: Onap long param
short_option: l
long_option: long-opt
diff --git a/framework/src/test/resources/sample-test-invalid-schema-duplicate-shortoption.yaml b/framework/src/test/resources/sample-test-invalid-schema-duplicate-shortoption.yaml
index 4eb07be4..d97e585a 100644
--- a/framework/src/test/resources/sample-test-invalid-schema-duplicate-shortoption.yaml
+++ b/framework/src/test/resources/sample-test-invalid-schema-duplicate-shortoption.yaml
@@ -42,7 +42,7 @@ parameters:
short_option: j
is_optional: false
- name: long-param
- type: long
+ type: digit
description: Onap long param
short_option: l
long_option: long-opt
diff --git a/framework/src/test/resources/sample-test-invalid-schema.yaml b/framework/src/test/resources/sample-test-invalid-schema.yaml
index 036a2071..fbe87081 100644
--- a/framework/src/test/resources/sample-test-invalid-schema.yaml
+++ b/framework/src/test/resources/sample-test-invalid-schema.yaml
@@ -41,7 +41,7 @@ parameters:
short_option: j
is_optional: false
- name: long-param
- type: long
+ type: digit
description: Onap long param
short_option: l
long_option: long-opt
diff --git a/framework/src/test/resources/sample-test-schema-http.yaml b/framework/src/test/resources/sample-test-schema-http.yaml
index c6e0450c..87918792 100644
--- a/framework/src/test/resources/sample-test-schema-http.yaml
+++ b/framework/src/test/resources/sample-test-schema-http.yaml
@@ -26,7 +26,7 @@ parameters:
is_optional: false
- name: status
description: Onap service status
- type: long
+ type: digit
short_option: z
long_option: service-status
is_optional: true
@@ -59,7 +59,7 @@ results:
- name: status
description: Onap service status
scope: short
- type: long
+ type: digit
- name: nodes
description: Onap service running nodes
scope: long
diff --git a/framework/src/test/resources/sample-test-schema.yaml b/framework/src/test/resources/sample-test-schema.yaml
index 48ef2d61..0387e48c 100644
--- a/framework/src/test/resources/sample-test-schema.yaml
+++ b/framework/src/test/resources/sample-test-schema.yaml
@@ -43,7 +43,7 @@ parameters:
is_optional: false
is_secured: false
- name: long-param
- type: long
+ type: digit
description: Onap long param
short_option: l
long_option: long-opt
diff --git a/framework/src/test/resources/schema-validate-basic.yaml b/framework/src/test/resources/schema-validate-basic.yaml
index f7880316..7cab57b5 100644
--- a/framework/src/test/resources/schema-validate-basic.yaml
+++ b/framework/src/test/resources/schema-validate-basic.yaml
@@ -24,7 +24,7 @@ parameters:
is_optional: false1
- name: status
description: Onap service status
- type: long
+ type: digit
short_option: z
long_option: service-version
is_optional: true
@@ -57,7 +57,7 @@ results:
- name: status
description: Onap service status
scope: short1
- type: long
+ type: digit
- name: nodes
description: Onap service running nodes
scope: long
diff --git a/framework/src/test/resources/schema-validate-http.yaml b/framework/src/test/resources/schema-validate-http.yaml
index c813b764..2f56ec44 100644
--- a/framework/src/test/resources/schema-validate-http.yaml
+++ b/framework/src/test/resources/schema-validate-http.yaml
@@ -24,7 +24,7 @@ parameters:
is_optional: false1
- name: status
description: Onap service status
- type: long
+ type: digit
short_option: z
long_option: service-version
is_optional: true
@@ -57,7 +57,7 @@ results:
- name: status
description: Onap service status
scope: short1
- type: long
+ type: digit
- name: nodes
description: Onap service running nodes
scope: long
diff --git a/framework/src/test/resources/schema-validate-invalidschematype.yaml b/framework/src/test/resources/schema-validate-invalidschematype.yaml
index 469f28ee..17f4abe3 100644
--- a/framework/src/test/resources/schema-validate-invalidschematype.yaml
+++ b/framework/src/test/resources/schema-validate-invalidschematype.yaml
@@ -22,7 +22,7 @@ parameters:
is_optional: false1
- name: status
description: Onap service status
- type: long
+ type: digit
short_option: z
long_option: service-version
is_optional: true
@@ -55,7 +55,7 @@ results:
- name: status
description: Onap service status
scope: short1
- type: long
+ type: digit
- name: nodes
description: Onap service running nodes
scope: long
diff --git a/main/src/test/resources/onap-cli-schema/sample-create-schema.yaml b/main/src/test/resources/onap-cli-schema/sample-create-schema.yaml
index 561fa22b..ff24c0aa 100644
--- a/main/src/test/resources/onap-cli-schema/sample-create-schema.yaml
+++ b/main/src/test/resources/onap-cli-schema/sample-create-schema.yaml
@@ -41,7 +41,7 @@ results:
- name: status
description: Onap service status
scope: short
- type: long
+ type: digit
- name: nodes
description: Onap service running nodes
scope: long
diff --git a/main/src/test/resources/sample-test-schema.yaml b/main/src/test/resources/sample-test-schema.yaml
index 286135c3..a4fd8563 100644
--- a/main/src/test/resources/sample-test-schema.yaml
+++ b/main/src/test/resources/sample-test-schema.yaml
@@ -41,7 +41,7 @@ parameters:
short_option: j
is_optional: false
- name: long-param
- type: long
+ type: digit
description: Onap long param
short_option: l
long_option: long-opt
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/esr/ems/ems-delete-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/esr/ems/ems-delete-schema-1.1.yaml
index 45ffd35b..c703c651 100644
--- a/plugins/aai/src/main/resources/onap-cli-schema/esr/ems/ems-delete-schema-1.1.yaml
+++ b/plugins/aai/src/main/resources/onap-cli-schema/esr/ems/ems-delete-schema-1.1.yaml
@@ -21,7 +21,7 @@ parameters:
is_optional: false
- name: resource-version
description: Onap vim resource version
- type: uuid
+ type: string
short_option: y
long_option: resource-version
is_optional: true
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml
index 83afd018..fe0d22a8 100644
--- a/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml
+++ b/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml
@@ -88,7 +88,7 @@ parameters:
http:
request:
- uri: /aai/v11/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/{sdnc-id}
+ uri: /aai/v11/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/${sdnc-id}
method: PUT
body: '{"thirdparty-sdnc-id":"${sdnc-id}","location":"${location}","product-name":"${product-name}","esr-system-info-list":{"esr-system-info":[{"esr-system-info-id":"${sdnc-id}","system-name":"${name}","type":"${type}","vendor":"${vendor}","version":"${sdnc-version}","service-url":"","user-name":"${username}","password":"${password}","system-type":"sdnc","protocal":"${protocal}","ssl-cacert":"","ssl-insecure":"","ip-address":"${ip-address}","port":"${port}","cloud-domain":"","default-tenant":""}]}}'
success_codes:
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml
index 3cee4726..eec0ca67 100644
--- a/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml
+++ b/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml
@@ -15,14 +15,14 @@ service:
parameters:
- name: sdnc-id
description: Onap VNFM unique id
- type: uuid
+ type: string
short_option: x
long_option: sdnc-id
is_optional: false
http:
request:
- uri: /aai/v11/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/{sdnc-id}
+ uri: /aai/v11/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/${sdnc-id}
method: DELETE
success_codes:
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml
index aa56b711..f84c480f 100644
--- a/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml
+++ b/plugins/aai/src/main/resources/onap-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml
@@ -19,46 +19,6 @@ results:
description: Onap sdnc id
scope: short
type: string
- - name: location
- description: Onap sdnc id
- scope: short
- type: string
- - name: name
- description: Onap sdnc name
- scope: short
- type: string
- - name: type
- description: Onap sdnc type
- scope: short
- type: string
- - name: vendor
- description: Onap sdnc vendor
- scope: short
- type: string
- - name: version
- description: Onap sdnc version
- scope: short
- type: string
- - name: ip-address
- description: Onap sdnc ip-address
- scope: short
- type: string
- - name: port
- description: Onap sdnc port
- scope: short
- type: string
- - name: protocal
- description: Onap sdnc protocal
- scope: short
- type: string
- - name: username
- description: Onap sdnc username
- scope: long
- type: string
- - name: product-name
- description: Onap sdnc product-name
- scope: short
- type: string
- name: resource-version
description: Onap sdnc resource version
scope: short
@@ -71,18 +31,8 @@ http:
success_codes:
- 200
result_map:
- sdnc-id: $b{$.esr-sdnc.[*].sdnc-id
- location: $b{$.esr-sdnc.[*].location
- name: $b{$.esr-sdnc.[*].esr-system-info-list.esr-system-info.[0].system-name
- type: $b{$.esr-sdnc.[*].esr-system-info-list.esr-system-info.[0].type
- vendor: $b{$.esr-sdnc.[*].esr-system-info-list.esr-system-info.[0].vendor
- version: $b{$.esr-sdnc.[*].esr-system-info-list.esr-system-info.[0].version
- ip-address: $b{$.esr-sdnc.[*].esr-system-info-list.esr-system-info.[0].ip-address
- port: $b{$.esr-sdnc.[*].esr-system-info-list.esr-system-info.[0].port
- protocal: $b{$.esr-sdnc.[*].esr-system-info-list.esr-system-info.[0].protocal
- username: $b{$.esr-sdnc.[*].esr-system-info-list.esr-system-info.[0].user-name
- product-name: $b{$.esr-sdnc.[*].product-name
- resource-version: $b{$.esr-sdnc.[*].resource-version
+ sdnc-id: $b{$.esr-sdnc.[*].sdnc-id}
+ resource-version: $b{$.esr-sdnc.[*].resource-version}
sample_response:
body: '{"esr-sdnc":[{"sdnc-id":"example-sdnc-id-val-36878","location":"location","product-name":"example-remotepath-val-80493","esr-system-info-list":{"esr-system-info":[{"esr-system-info-id":"example-esr-system-info-id-val-44791","system-name":"example-system-name-val-48687","type":"example-type-val-95885","vendor":"example-vendor-val-41061","version":"example-version-val-38559","service-url":"example-service-url-val-2663","user-name":"example-user-name-val-26126","password":"example-password-val-33838","system-type":"sdnc","protocal":"","ssl-cacert":"","ssl-insecure":false,"ip-address":"","port":"","cloud-domain":"","default-tenant":""}]}}]}'
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml
index 55d1604f..ee74ead5 100644
--- a/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml
+++ b/plugins/aai/src/main/resources/onap-cli-schema/esr/vim/vim-delete-schema-1.1.yaml
@@ -33,7 +33,7 @@ parameters:
is_optional: false
- name: resource-version
description: Onap vim resource version
- type: uuid
+ type: string
short_option: b
long_option: resource-version
is_optional: true
diff --git a/plugins/msb/src/main/resources/onap-cli-schema/microservice-create-schema.yaml b/plugins/msb/src/main/resources/onap-cli-schema/microservice-create-schema.yaml
index 1d0053fc..dd3aead1 100644
--- a/plugins/msb/src/main/resources/onap-cli-schema/microservice-create-schema.yaml
+++ b/plugins/msb/src/main/resources/onap-cli-schema/microservice-create-schema.yaml
@@ -53,7 +53,7 @@ results:
- name: status
description: Onap service status
scope: short
- type: long
+ type: digit
- name: nodes
description: Onap service running nodes
scope: long
@@ -83,4 +83,3 @@ http:
sample_response:
body: '{"serviceName":"test","version":"v1","url":"/api/test/v1","protocol":"REST","visualRange":"1","lb_policy":"hash","nodes":[{"ip":"127.0.0.1","port":"8012","ttl":0,"nodeId":"test_127.0.0.1_8012","expiration":"2017-02-10T05:33:25Z","created_at":"2017-02-10T05:33:25Z","updated_at":"2017-02-10T05:33:25Z"}],"status":"1"}'
-
diff --git a/plugins/msb/src/main/resources/onap-cli-schema/microservice-list-schema.yaml b/plugins/msb/src/main/resources/onap-cli-schema/microservice-list-schema.yaml
index 981d6190..b9bc3065 100644
--- a/plugins/msb/src/main/resources/onap-cli-schema/microservice-list-schema.yaml
+++ b/plugins/msb/src/main/resources/onap-cli-schema/microservice-list-schema.yaml
@@ -24,7 +24,7 @@ results:
- name: status
description: Onap service status
scope: short
- type: long
+ type: digit
- name: nodes
description: Onap service running nodes
scope: long
diff --git a/plugins/msb/src/main/resources/onap-cli-schema/microservice-show-schema.yaml b/plugins/msb/src/main/resources/onap-cli-schema/microservice-show-schema.yaml
index 919af2d7..437e5672 100644
--- a/plugins/msb/src/main/resources/onap-cli-schema/microservice-show-schema.yaml
+++ b/plugins/msb/src/main/resources/onap-cli-schema/microservice-show-schema.yaml
@@ -37,7 +37,7 @@ results:
- name: status
description: Onap service status
scope: short
- type: long
+ type: digit
- name: nodes
description: Onap service running nodes
scope: long
diff --git a/plugins/msb/src/test/resources/service-list-schema.yaml b/plugins/msb/src/test/resources/service-list-schema.yaml
index 3c97d30b..d6ec32fa 100644
--- a/plugins/msb/src/test/resources/service-list-schema.yaml
+++ b/plugins/msb/src/test/resources/service-list-schema.yaml
@@ -23,7 +23,7 @@ results:
- name: status
description: Onap service status
scope: short
- type: long
+ type: digit
- name: nodes
description: Onap service running nodes
scope: long