summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-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
14 files changed, 21 insertions, 21 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