aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/test/resources')
-rw-r--r--framework/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand (renamed from framework/src/test/resources/META-INF/services/org.onap.cli.fw.OnapCommand)0
-rw-r--r--framework/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml95
-rw-r--r--framework/src/test/resources/open-cli-schema/testauth-login.yaml28
-rw-r--r--framework/src/test/resources/open-cli-schema/testauth-logout.yaml19
-rw-r--r--framework/src/test/resources/open-cli.properties39
-rw-r--r--framework/src/test/resources/sample-test-schema-auth-required.yaml16
-rw-r--r--framework/src/test/resources/sample-test-schema-http.yaml92
-rw-r--r--framework/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml26
-rw-r--r--framework/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml28
-rw-r--r--framework/src/test/resources/sample-test-schema-swagger.yaml28
-rw-r--r--framework/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml26
-rw-r--r--framework/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml28
-rw-r--r--framework/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml28
-rw-r--r--framework/src/test/resources/schema-validate-http.yaml98
14 files changed, 0 insertions, 551 deletions
diff --git a/framework/src/test/resources/META-INF/services/org.onap.cli.fw.OnapCommand b/framework/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
index a01b9d53..a01b9d53 100644
--- a/framework/src/test/resources/META-INF/services/org.onap.cli.fw.OnapCommand
+++ b/framework/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
diff --git a/framework/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml b/framework/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml
deleted file mode 100644
index f162231f..00000000
--- a/framework/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml
+++ /dev/null
@@ -1,95 +0,0 @@
-open_cli_schema_version: 1.0
-name: sample-test1
-description: Oclip sample command to test the command features
-
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-parameters:
- - name: bool-param
- type: bool
- description: Oclip boolean param, by default its always false.
- short_option: b
- long_option: bool
- is_optional: true
- default_value: false
- - name: secure-param
- type: string
- description: Oclip secure param such as password
- short_option: x
- long_option: secure
- is_secured: true
- is_optional: false
- default_Value: pass123#
- - name: string-param
- type: string
- description: Oclip string param
- long_option: string-param
- short_option: c
- is_optional: false
- default_Value: test
- - name: yaml-param
- type: json
- description: Oclip yaml file location param
- long_option: yaml-param
- short_option: y
- is_optional: false
- - name: json-param
- type: json
- description: Oclip json file location param
- long_option: json-param
- short_option: j
- is_optional: false
- - name: long-param
- type: digit
- description: Oclip long param
- short_option: l
- long_option: long-opt
- is_optional: false
- default_value: 10
- - name: url-param
- type: url
- description: Oclip url param
- short_option: r
- long_option: url
- is_optional: false
- default_value: http://localhost:8082/file.txt
- - name: env-param
- type: string
- description: Oclip env param.
- short_option: z
- long_option: env
- is_optional: false
- default_value: ${ENV_VAR}
- - name: positional-args
- type: string
- description: Oclip positional args, if no short option and no long option given for it
- is_optional: false
- default_value: http://localhost:8082/file.txt
-http:
- request:
- uri: /vims
- method: POST
- body: '{"name":"${name}","vendor":"${vendor}","version":"${vim-version}","description":"${description}","type":"${type}","url":"${url}","userName":"${username}","password":"${password}","domain":"${domain}","tenant":"${tenant}"}'
- headers:
- success_codes:
- - 201
- - 200
- result_map:
- id: $b{$.vimId}
- name: $b{$.name}
- vendor: $b{$.vendor}
- type: $b{$.type}
- version: $b{$.version}
- url: $b{$.url}
- description: $b{$.description}
- username: $b{$.userName}
- password: $b{$.password}
- domain: $b{$.domain}
- tenant: $b{$.tenant}
- create-time: $b{$.createTime}
- sample_response:
- body:'{"id":"string","name":"string","vendor":"string","version":"string","description":"string","type":"string","createTime":"string","url":"string","userName":"string","password":"string","domain":"string","tenant":"string"}' \ No newline at end of file
diff --git a/framework/src/test/resources/open-cli-schema/testauth-login.yaml b/framework/src/test/resources/open-cli-schema/testauth-login.yaml
deleted file mode 100644
index 3e9211ef..00000000
--- a/framework/src/test/resources/open-cli-schema/testauth-login.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-open_cli_schema_version: 1.0
-
-name: testauth-login
-
-description: basic login auth command
-
-info:
- product: open-cli
- service: test
- type: auth
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-parameters:
- - name: string-param
- type: string
- description: Oclip string param
- long_option: string-param
- short_option: c
- is_optional: false
- default_Value: test
-
-# followings are dummy simulator for http command
-http:
- request:
- uri: /
- method: GET
- success_codes:
- - 200
diff --git a/framework/src/test/resources/open-cli-schema/testauth-logout.yaml b/framework/src/test/resources/open-cli-schema/testauth-logout.yaml
deleted file mode 100644
index dfe33638..00000000
--- a/framework/src/test/resources/open-cli-schema/testauth-logout.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-open_cli_schema_version: 1.0
-
-name: testauth-logout
-
-description: basic logout auth command
-
-info:
- product: open-cli
- service: test
- type: auth
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-# followings are dummy simulator for http command
-http:
- request:
- uri: /
- method: GET
- success_codes:
- - 200 \ No newline at end of file
diff --git a/framework/src/test/resources/open-cli.properties b/framework/src/test/resources/open-cli.properties
deleted file mode 100644
index 23ba7800..00000000
--- a/framework/src/test/resources/open-cli.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-cli.ignore_auth=false
-cli.http.api_key_use_cookies=true
-cli.discover_always=true
-cli.product_name=open-cli
-cli.version=1.0
-
-#schema validation
-cli.schema.top_level_params_list=open_cli_schema_version,name,description,parameters,results,http,info
-cli.schema.top_level_mandatory_list=open_cli_schema_version
-
-cli.schema.info_params_list=product,service,type,author,ignore
-cli.schema.info_params_mandatory_list=product,service
-
-cli.schema.input_params_list=name,description,type,short_option,long_option, is_optional,default_value,is_secured,is_include
-cli.schema.input_params_mandatory_list=name,description,type
-
-cli.schema.result_params_list=name,description,scope,type,is_secured, default_value
-cli.schema.result_params_mandatory_list=name, description, type, scope
-
-#http
-cli.schema.http_sections=request,service,success_codes,result_map,sample_response
-cli.schema.http_mandatory_sections=request, success_codes
-
-cli.schema.http_request_params=uri,method,body,headers,queries,multipart_entity_name
-cli.schema.http_request_mandatory_params=uri,method
-
-cli.schema.service_params_list=name,version,auth,mode
-cli.schema.service_params_mandatory_list=auth,mode
-
-cli.schema.http_methods=post,get,delete,put,head
-
-cli.schema.boolean_values=true,false
-cli.schema.auth_values=none,basic
-cli.schema.mode_values=direct,catalog
-cli.command.type=cmd,auth,catalog
-
-# mrkanag Move this to db, once exteranl command registration is supported in place of discovery
-cli.schema.type.supported=http
-
diff --git a/framework/src/test/resources/sample-test-schema-auth-required.yaml b/framework/src/test/resources/sample-test-schema-auth-required.yaml
deleted file mode 100644
index bb919d9a..00000000
--- a/framework/src/test/resources/sample-test-schema-auth-required.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-open_cli_schema_version: 1.0
-name: sample-test
-description: Oclip sample command to test the command features
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-parameters:
- - name: bool-param
- type: bool
- description: Oclip boolean param, by default its always false.
- short_option: b
- long_option: bool
- is_optional: true
- default_value: false \ No newline at end of file
diff --git a/framework/src/test/resources/sample-test-schema-http.yaml b/framework/src/test/resources/sample-test-schema-http.yaml
deleted file mode 100644
index 4ae6e9e0..00000000
--- a/framework/src/test/resources/sample-test-schema-http.yaml
+++ /dev/null
@@ -1,92 +0,0 @@
-open_cli_schema_version: 1.0
-name: sample-create-http
-description: Register microservice into Onap
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-parameters:
- - name: service-name
- description: Oclip service name
- type: string
- short_option: x
- long_option: service-name
- is_optional: false
- - name: service-version
- description: Oclip service version
- type: string
- short_option: y
- long_option: service-version
- is_optional: false
- - name: service-url
- description: Oclip service base url
- type: url
- short_option: r
- long_option: service-url
- is_optional: false
- - name: status
- description: Oclip service status
- type: digit
- short_option: z
- long_option: service-status
- is_optional: true
- default_value: 1
- - name: node-ip
- description: Oclip service running node IP
- type: string
- - name: node-port
- description: Oclip service running node port
- type: string
- - name: create-or-update
- description: Oclip service create or update
- type: bool
- default_value: true
-results:
- direction: portrait
- attributes:
- - name: name
- description: Oclip service name
- scope: short
- type: string
- - name: version
- description: Oclip service version
- scope: short
- type: string
- - name: url
- description: Oclip service base url
- scope: short
- type: url
- - name: status
- description: Oclip service status
- scope: short
- type: digit
- - name: nodes
- description: Oclip service running nodes
- scope: long
- type: string
- - name: location
- description: Oclip service location
- scope: long
- type: url
-http:
- request:
- uri: /services
- method: POST
- body: '{"serviceName":"${service-name}","version":"${service-version}","url":"${service-url}","protocol":"REST","visualRange":"1","lb_policy":"hash","nodes":[{"ip":"${node-ip}","port":"${node-port}","ttl":0}]}'
- headers:
- queries:
- createOrUpdate: ${create-or-update}
- success_codes:
- - 201
- - 200
- result_map:
- name: $b{$.serviceName}
- version: $b{$.version}
- url: $b{$.url}
- status: $b{$.status}
- nodes: $b{$.nodes[*].ip}:$b{$.nodes[*].port}
- location: $h{Location}
-
- 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"} \ No newline at end of file
diff --git a/framework/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml b/framework/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml
deleted file mode 100644
index 2629a2f9..00000000
--- a/framework/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-open_cli_schema_version: 1.0
-
-name: sample-cmd-no-auth-no-catalog
-
-description: sample
-
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-http:
-
- service:
- name: sample
- version: v1
- auth: none
- mode: direct
- request:
- uri: /test
- method: GET
- success_codes:
- - 200
- result_map:
- name: ${name}
diff --git a/framework/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml b/framework/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml
deleted file mode 100644
index 15b5bf0c..00000000
--- a/framework/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-open_cli_schema_version: 1.0
-
-name: sample-cmd-no-auth-no-catalog
-
-description: sample
-
-
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-http:
-
- service:
- name: sample
- version: v1
- auth: none
- mode: catalog
-
- request:
- uri: /test
- method: GET
- success_codes:
- - 200
- result_map:
- name: ${name}
diff --git a/framework/src/test/resources/sample-test-schema-swagger.yaml b/framework/src/test/resources/sample-test-schema-swagger.yaml
deleted file mode 100644
index 4108d4e6..00000000
--- a/framework/src/test/resources/sample-test-schema-swagger.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-open_cli_schema_version: 1.0
-name: sample-test-swagger
-description: Sample swagger command test.
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-parameters:
- - name: user
- type: string
- description: Oclip user
- short_option: n
- long_option: username
- is_optional: false
-results:
- direction: portrait
- attributes:
- - name: name
- description: Oclip user
- scope: short
- type: string
-exec:
- api: org.onap.common_services.auth.auth_service.client.api.DefaultApi
- client: org.onap.common_services.auth.auth_service.client.invoker.ApiClient
- entity: org.onap.common_services.auth.auth_service.client.model.User, username(userName), password, description
- method: create
- exception: org.onap.common_services.auth.auth_service.client.invoker.ApiException \ No newline at end of file
diff --git a/framework/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml b/framework/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml
deleted file mode 100644
index bb0ae46b..00000000
--- a/framework/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-open_cli_schema_version: 1.0
-
-name: sample-cmd-yes-auth-no-catalog
-
-description: sample
-
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-http:
-
- service:
- name: sample
- version: v1
- auth: basic
- mode: direct
- request:
- uri: /test
- method: GET
- success_codes:
- - 200
- result_map:
- name: ${name}
diff --git a/framework/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml b/framework/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml
deleted file mode 100644
index a5a39f92..00000000
--- a/framework/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-open_cli_schema_version: 1.0
-
-name: sample-cmd-yes-auth-no-catalog-extra-params
-
-description: sample
-
-
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-http:
-
- service:
- name: sample
- version: v1
- auth: testauth
- mode: catalog
-
- request:
- uri: /test
- method: GET
- success_codes:
- - 200
- result_map:
- name: ${name}
diff --git a/framework/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml b/framework/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml
deleted file mode 100644
index 4efd4c51..00000000
--- a/framework/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-open_cli_schema_version: 1.0
-
-name: sample-cmd-no-auth-no-catalog
-
-description: sample
-
-
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-http:
-
- service:
- name: sample
- version: v1
- auth: basic
- mode: catalog
-
- request:
- uri: /test
- method: GET
- success_codes:
- - 200
- result_map:
- name: ${name}
diff --git a/framework/src/test/resources/schema-validate-http.yaml b/framework/src/test/resources/schema-validate-http.yaml
deleted file mode 100644
index 7bdafc56..00000000
--- a/framework/src/test/resources/schema-validate-http.yaml
+++ /dev/null
@@ -1,98 +0,0 @@
-open_cli_schema_version: 1.0
-description: Register microservice into Onap
-name: schema-validate
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-parameters:
- - name: service-name1
- description: Oclip service name
- type: string
- short_option: x
- long_option: service-name
- is_optional: false
- - name: service-version
- description: Oclip service version
- type: string
- short_option: x
- long_option: service-version
- is_optional: false
- - name: service-url
- description: Oclip service base url
- type: url1
- short_option: u
- long_option: service-url
- is_optional: false1
- - name: status
- description: Oclip service status
- type: digit
- short_option: z
- long_option: service-version
- is_optional: true
- default_value: 1
- - name: node-ip
- description: Oclip service running node IP
- type: string
- - name: node-port
- description: Oclip service running node port
- type: string
- - name: create-or-update
- description: Oclip service create or update
- type: cfbcv
- default_value: true
-results:
- direction: portrait
- attributes:
- - name: name
- description: Oclip service name
- scope: short
- type: string
- - name: version
- description: Oclip service version
- scope: short
- type: string
- - name: status
- description: Oclip service base url
- scope: short
- type: url
- - name: status
- description: Oclip service status
- scope: short1
- type: digit
- - name: nodes
- description: Oclip service running nodes
- scope: long
- type: string
- - name: location
- description: Oclip service location
- scope: long
- type: url
-http:
- service:
- name: msb
- version: v1
- type: direct
- auth: none
- request:
- uri: /services
- method: POST1
- body: '{"serviceName":"${service}","serviceName":"${service-name}","version":"${service-version}","url":"${service-url}","protocol":"REST","visualRange":"1","lb_policy":"hash","nodes":[{"ip":"${node-ip}","port":"${node-port}","ttl":0}]}'
- headers:
- queries:
- createOrUpdate: ${create-or-update1}
- success_codes:
- - 201
- - 300
- result_map:
- name: $b{$.serviceName}
- version: $b{$.version}
- url: $b{$.url}
- status1: $b{$.status}
- nodes: $b{$.nodes[*].ip}:$b{$.nodes[*].port}
- location: $h{Location}
- 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"}
-