From 39f345954434553d10e0cea114e15e0521ec9471 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Tue, 26 Sep 2017 10:04:10 +0530 Subject: Migrate onap-cli-schema into open-cli-schema Issue-Id: CLI-66 Change-Id: I719719194bc5f21f4316380e606ce1a58f0f046c Signed-off-by: Kanagaraj Manickam k00365106 --- .../resources/onap-cli-schema/basic-login.yaml | 17 ------ .../resources/onap-cli-schema/basic-logout.yaml | 13 ----- .../main/resources/onap-cli-schema/catalog.yaml | 42 --------------- .../resources/onap-cli-schema/schema-refresh.yaml | 31 ----------- .../resources/onap-cli-schema/schema-validate.yaml | 38 ------------- framework/src/main/resources/onap.properties | 62 ---------------------- .../resources/open-cli-schema/basic-login.yaml | 17 ++++++ .../resources/open-cli-schema/basic-logout.yaml | 13 +++++ .../main/resources/open-cli-schema/catalog.yaml | 42 +++++++++++++++ .../resources/open-cli-schema/schema-refresh.yaml | 31 +++++++++++ .../resources/open-cli-schema/schema-validate.yaml | 38 +++++++++++++ framework/src/main/resources/open-cli.properties | 49 +++++++++++++++++ 12 files changed, 190 insertions(+), 203 deletions(-) delete mode 100644 framework/src/main/resources/onap-cli-schema/basic-login.yaml delete mode 100644 framework/src/main/resources/onap-cli-schema/basic-logout.yaml delete mode 100644 framework/src/main/resources/onap-cli-schema/catalog.yaml delete mode 100644 framework/src/main/resources/onap-cli-schema/schema-refresh.yaml delete mode 100644 framework/src/main/resources/onap-cli-schema/schema-validate.yaml delete mode 100644 framework/src/main/resources/onap.properties create mode 100644 framework/src/main/resources/open-cli-schema/basic-login.yaml create mode 100644 framework/src/main/resources/open-cli-schema/basic-logout.yaml create mode 100644 framework/src/main/resources/open-cli-schema/catalog.yaml create mode 100644 framework/src/main/resources/open-cli-schema/schema-refresh.yaml create mode 100644 framework/src/main/resources/open-cli-schema/schema-validate.yaml create mode 100644 framework/src/main/resources/open-cli.properties (limited to 'framework/src/main/resources') diff --git a/framework/src/main/resources/onap-cli-schema/basic-login.yaml b/framework/src/main/resources/onap-cli-schema/basic-login.yaml deleted file mode 100644 index 10bc8a80..00000000 --- a/framework/src/main/resources/onap-cli-schema/basic-login.yaml +++ /dev/null @@ -1,17 +0,0 @@ -open_cli_schema_version: 1.0 -name: basic-login -description: basic login auth command -version: cli-1.0 -type: auth - -service: - name: onap-cli - version: 1.0.0 - -results: - direction: portrait - attributes: - - name: Authorization - description: Authorization - scope: short - type: string diff --git a/framework/src/main/resources/onap-cli-schema/basic-logout.yaml b/framework/src/main/resources/onap-cli-schema/basic-logout.yaml deleted file mode 100644 index ccb05160..00000000 --- a/framework/src/main/resources/onap-cli-schema/basic-logout.yaml +++ /dev/null @@ -1,13 +0,0 @@ -open_cli_schema_version: 1.0 - -name: basic-logout - -description: basic logout auth command - -version: cli-1.0 - -type: auth - -service: - name: onap-cli - version: 1.0.0 diff --git a/framework/src/main/resources/onap-cli-schema/catalog.yaml b/framework/src/main/resources/onap-cli-schema/catalog.yaml deleted file mode 100644 index 6cfdb0a0..00000000 --- a/framework/src/main/resources/onap-cli-schema/catalog.yaml +++ /dev/null @@ -1,42 +0,0 @@ -open_cli_schema_version: 1.0 - -name: catalog - -description: cli catalog command to find the base path for service. - -version: cli-1.0 - -type: catalog - -service: - auth: none - name: onap-cli - version: 1.0.0 - mode: direct - -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 -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/framework/src/main/resources/onap-cli-schema/schema-refresh.yaml b/framework/src/main/resources/onap-cli-schema/schema-refresh.yaml deleted file mode 100644 index 280dec36..00000000 --- a/framework/src/main/resources/onap-cli-schema/schema-refresh.yaml +++ /dev/null @@ -1,31 +0,0 @@ -open_cli_schema_version: 1.0 -name: schema-refresh -description: Onap command to refresh schemas stored in onap_cli_schema folders. -version: cli-1.0 -service: - auth: none - name: onap-cli - version: 1.0.0 -results: - direction: landscape - attributes: - - name: sl-no - description: Serial Number - scope: short - type: string - - name: command - description: Command name - scope: short - type: string - - name: product-version - description: Command product version - scope: short - type: string - - name: schema - description: Schema name - scope: short - type: string - - name: version - description: Schema version - scope: short - type: string \ No newline at end of file diff --git a/framework/src/main/resources/onap-cli-schema/schema-validate.yaml b/framework/src/main/resources/onap-cli-schema/schema-validate.yaml deleted file mode 100644 index 55e61e58..00000000 --- a/framework/src/main/resources/onap-cli-schema/schema-validate.yaml +++ /dev/null @@ -1,38 +0,0 @@ -open_cli_schema_version: 1.0 -name: schema-validate -description: Onap command to validate schema -version: cli-1.0 -service: - auth: none - name: onap-cli - version: 1.0.0 -default_parameters: - exclude: - - host-username - - host-password - - host-url - - no-auth -parameters: - - name: schema-location - type: url - description: Schema file location - short_option: l - long_option: schema-location - is_optional: false - - name: internal-schema - type: bool - description: Validate existing schema file - short_option: i - long_option: internal-schema - is_optional: false -results: - direction: landscape - attributes: - - name: sl-no - description: Serial Number of error - scope: short - type: string - - name: error - description: Schema validation error - scope: short - type: string \ No newline at end of file diff --git a/framework/src/main/resources/onap.properties b/framework/src/main/resources/onap.properties deleted file mode 100644 index d73f1454..00000000 --- a/framework/src/main/resources/onap.properties +++ /dev/null @@ -1,62 +0,0 @@ -cli.ignore_auth=false -cli.version=1.0 -cli.http.api_key_use_cookies=true -cli.discover_always=false - -cli.service_name=onap-cli -cli.api_gateway=msb -cli.auth_service=auth - -# service section -cli.exclude_params_internal_cmd=host-username,host-password,host-url,no-auth -cli.no_auth_disable_include_params_external_cmd=host-username,host-password,host-url,no-auth -cli.no_auth_enable_exclude_params_external_cmd=host-username,host-password,no-auth -cli.no_auth_enable_include_params_external_cmd=host-url - -cli.http.basic.common_headers=x-auth-token,x-transaction-id,x-app-id -cli.http.basic.common_headers.x-auth-token=Authorization -cli.http.basic.common_headers.x-transaction-id=X-TransactionId -cli.http.basic.common_headers.x-transaction-id.value=req-uuid -cli.http.basic.common_headers.x-app-id=X-FromAppId -cli.http.basic.common_headers.x-app-id.value=onap-cli - -# Service specific headers -cli.http.basic.common_headers.sdc=user-id -cli.http.basic.common_headers.sdc.user-id=USER_ID -cli.http.basic.common_headers.sdc.user-id.value=${host-username} - -#TODO mrkanag add support for aaf like defined above for basic -#cli.service.auth=aaf - -#schema validation -cli.schema.top_level_params_list=open_cli_schema_version,name,version,description,service,parameters,results,http,type -cli.schema.top_level_mandatory_list=open_cli_schema_version - -cli.schema.service_params_list=name,version,auth,mode -cli.schema.service_params_mandatory_list=name,version - -cli.schema.input_params_list=name,description,type,short_option,long_option, is_optional,default_value,is_secured -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 - -cli.schema.http_sections=request,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.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 - -#product version -cli.product.version=cli-1.0 - -# moco properties -cli.sample.gen.enable=false -cli.sample.gen.target=. - diff --git a/framework/src/main/resources/open-cli-schema/basic-login.yaml b/framework/src/main/resources/open-cli-schema/basic-login.yaml new file mode 100644 index 00000000..78294fc5 --- /dev/null +++ b/framework/src/main/resources/open-cli-schema/basic-login.yaml @@ -0,0 +1,17 @@ +open_cli_schema_version: 1.0 +name: basic-login +description: basic login auth command +version: cli-1.0 +type: auth + +service: + name: open-cli + version: 1.0.0 + +results: + direction: portrait + attributes: + - name: Authorization + description: Authorization + scope: short + type: string diff --git a/framework/src/main/resources/open-cli-schema/basic-logout.yaml b/framework/src/main/resources/open-cli-schema/basic-logout.yaml new file mode 100644 index 00000000..2c0e3dbd --- /dev/null +++ b/framework/src/main/resources/open-cli-schema/basic-logout.yaml @@ -0,0 +1,13 @@ +open_cli_schema_version: 1.0 + +name: basic-logout + +description: basic logout auth command + +version: cli-1.0 + +type: auth + +service: + name: open-cli + version: 1.0.0 diff --git a/framework/src/main/resources/open-cli-schema/catalog.yaml b/framework/src/main/resources/open-cli-schema/catalog.yaml new file mode 100644 index 00000000..160ff1d4 --- /dev/null +++ b/framework/src/main/resources/open-cli-schema/catalog.yaml @@ -0,0 +1,42 @@ +open_cli_schema_version: 1.0 + +name: catalog + +description: cli catalog command to find the base path for service. + +version: cli-1.0 + +type: catalog + +service: + auth: none + name: open-cli + version: 1.0.0 + mode: direct + +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 +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/framework/src/main/resources/open-cli-schema/schema-refresh.yaml b/framework/src/main/resources/open-cli-schema/schema-refresh.yaml new file mode 100644 index 00000000..5f1cb50e --- /dev/null +++ b/framework/src/main/resources/open-cli-schema/schema-refresh.yaml @@ -0,0 +1,31 @@ +open_cli_schema_version: 1.0 +name: schema-refresh +description: Onap command to refresh schemas stored in OPEN_cli_schema folders. +version: cli-1.0 +service: + auth: none + name: open-cli + version: 1.0.0 +results: + direction: landscape + attributes: + - name: sl-no + description: Serial Number + scope: short + type: string + - name: command + description: Command name + scope: short + type: string + - name: product-version + description: Command product version + scope: short + type: string + - name: schema + description: Schema name + scope: short + type: string + - name: version + description: Schema version + scope: short + type: string \ No newline at end of file diff --git a/framework/src/main/resources/open-cli-schema/schema-validate.yaml b/framework/src/main/resources/open-cli-schema/schema-validate.yaml new file mode 100644 index 00000000..8c777666 --- /dev/null +++ b/framework/src/main/resources/open-cli-schema/schema-validate.yaml @@ -0,0 +1,38 @@ +open_cli_schema_version: 1.0 +name: schema-validate +description: Onap command to validate schema +version: cli-1.0 +service: + auth: none + name: open-cli + version: 1.0.0 +default_parameters: + exclude: + - host-username + - host-password + - host-url + - no-auth +parameters: + - name: schema-location + type: url + description: Schema file location + short_option: l + long_option: schema-location + is_optional: false + - name: internal-schema + type: bool + description: Validate existing schema file + short_option: i + long_option: internal-schema + is_optional: false +results: + direction: landscape + attributes: + - name: sl-no + description: Serial Number of error + scope: short + type: string + - name: error + description: Schema validation error + scope: short + type: string \ No newline at end of file diff --git a/framework/src/main/resources/open-cli.properties b/framework/src/main/resources/open-cli.properties new file mode 100644 index 00000000..2531ce22 --- /dev/null +++ b/framework/src/main/resources/open-cli.properties @@ -0,0 +1,49 @@ +cli.ignore_auth=false +cli.http.api_key_use_cookies=true +cli.discover_always=false + +cli.service_name=open-cli +cli.product.version=cli-1.0 +cli.version=1.0 + +# service section +cli.exclude_params_internal_cmd=host-username,host-password,host-url,no-auth +cli.no_auth_disable_include_params_external_cmd=host-username,host-password,host-url,no-auth +cli.no_auth_enable_exclude_params_external_cmd=host-username,host-password,no-auth +cli.no_auth_enable_include_params_external_cmd=host-url + +#schema validation +cli.schema.top_level_params_list=open_cli_schema_version,name,version,description,service,parameters,results,http,type +cli.schema.top_level_mandatory_list=open_cli_schema_version + +cli.schema.service_params_list=name,version,auth,mode +cli.schema.service_params_mandatory_list=name,version + +cli.schema.input_params_list=name,description,type,short_option,long_option, is_optional,default_value,is_secured +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 + +cli.schema.http_sections=request,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.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 + +<<<<<<< 5301969fc26714a8494882027116282898278f32:framework/src/main/resources/onap.properties +#product version +cli.product.version=cli-1.0 + +# moco properties +cli.sample.gen.enable=false +cli.sample.gen.target=. + +======= +>>>>>>> Migrate onap-cli-schema into open-cli-schema:framework/src/main/resources/open-cli.properties -- cgit 1.2.3-korg