aboutsummaryrefslogtreecommitdiffstats
path: root/profiles/http/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/http/src/main/resources')
-rw-r--r--profiles/http/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand4
-rw-r--r--profiles/http/src/main/resources/open-cli-http.properties18
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/basic-login.yaml19
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/basic-logout.yaml19
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/catalog.yaml44
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml36
6 files changed, 140 insertions, 0 deletions
diff --git a/profiles/http/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand b/profiles/http/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
new file mode 100644
index 00000000..5ce19e66
--- /dev/null
+++ b/profiles/http/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
@@ -0,0 +1,4 @@
+org.onap.cli.fw.http.cmd.BasicAuthLoginCommand
+org.onap.cli.fw.http.cmd.BasicAuthLogoutCommand
+org.onap.cli.fw.http.cmd.CatalogCommand
+org.onap.cli.fw.http.cmd.OnapHttpCommand \ No newline at end of file
diff --git a/profiles/http/src/main/resources/open-cli-http.properties b/profiles/http/src/main/resources/open-cli-http.properties
new file mode 100644
index 00000000..caeb4a95
--- /dev/null
+++ b/profiles/http/src/main/resources/open-cli-http.properties
@@ -0,0 +1,18 @@
+cli.ignore_auth=false
+cli.http.api_key_use_cookies=true
+
+#schema validation
+#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.auth_values=none,basic
+cli.schema.mode_values=direct,catalog
diff --git a/profiles/http/src/main/resources/open-cli-schema/http/basic-login.yaml b/profiles/http/src/main/resources/open-cli-schema/http/basic-login.yaml
new file mode 100644
index 00000000..36473df7
--- /dev/null
+++ b/profiles/http/src/main/resources/open-cli-schema/http/basic-login.yaml
@@ -0,0 +1,19 @@
+open_cli_schema_version: 1.0
+
+name: basic-login
+
+description: basic login auth command
+
+info:
+ product: open-cli
+ service: basic-auth
+ type: auth
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+results:
+ direction: portrait
+ attributes:
+ - name: Authorization
+ description: Authorization
+ scope: short
+ type: string
diff --git a/profiles/http/src/main/resources/open-cli-schema/http/basic-logout.yaml b/profiles/http/src/main/resources/open-cli-schema/http/basic-logout.yaml
new file mode 100644
index 00000000..f4acc0ae
--- /dev/null
+++ b/profiles/http/src/main/resources/open-cli-schema/http/basic-logout.yaml
@@ -0,0 +1,19 @@
+open_cli_schema_version: 1.0
+
+name: basic-logout
+
+description: basic logout auth command
+
+info:
+ product: open-cli
+ service: basic-auth
+ type: auth
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: host-username
+ is_include: false
+ - name: host-password
+ is_include: false
+ - name: no-auth
+ is_include: false \ No newline at end of file
diff --git a/profiles/http/src/main/resources/open-cli-schema/http/catalog.yaml b/profiles/http/src/main/resources/open-cli-schema/http/catalog.yaml
new file mode 100644
index 00000000..508955f5
--- /dev/null
+++ b/profiles/http/src/main/resources/open-cli-schema/http/catalog.yaml
@@ -0,0 +1,44 @@
+open_cli_schema_version: 1.0
+
+name: catalog
+
+description: cli catalog command to find the base path for service.
+
+info:
+ product: open-cli
+ service: catalog
+ type: catalog
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: catalog-service-name
+ type: string
+ description: service name registered in catalog service
+ short_option: l
+ long_option: catalog-service-name
+ is_optional: false
+ - name: catalog-service-version
+ type: string
+ description: service version registered in catalog service
+ short_option: i
+ long_option: catalog-service-version
+ is_optional: false
+ - name: host-username
+ is_include: false
+ - name: host-password
+ is_include: false
+ - name: no-auth
+ is_include: false
+results:
+ direction: portrait
+ attributes:
+ - name: catalog-service-host-url
+ description: Service connection url
+ scope: short
+ type: string
+ default_value: ${host-url}
+ - name: catalog-service-base-path
+ description: service base path, to append with host-url for connecting the service.
+ scope: short
+ type: string
+ default_value: / \ No newline at end of file
diff --git a/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml b/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
new file mode 100644
index 00000000..d7fbe03c
--- /dev/null
+++ b/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
@@ -0,0 +1,36 @@
+open_cli_schema_version: 1.0
+
+info:
+ product: open-cli
+ service: default-param
+ ignore: true
+
+parameters:
+ - name: host-username
+ type: string
+ description: Host user name
+ short_option: u
+ long_option: host-username
+ default_value: $s{env:OPEN_CLI_HOST_USERNAME}
+ is_optional: false
+ - name: host-password
+ type: string
+ description: Host user password
+ short_option: p
+ long_option: host-password
+ default_value: $s{env:OPEN_CLI_HOST_PASSWORD}
+ is_secured: true
+ is_optional: false
+ - name: host-url
+ type: url
+ description: host url in http(s)
+ short_option: m
+ long_option: host-url
+ is_optional: false
+ default_value: $s{env:OPEN_CLI_HOST_URL}
+ - name: no-auth
+ type: bool
+ description: whether to authenticate user or not
+ short_option: a
+ long_option: no-auth
+ default_value: false \ No newline at end of file