protected boolean isInitialzied = false;
public String getSchemaVersion() {
- return Constants.ONAP_CMD_SCHEMA_VERSION_VALUE;
+ return Constants.OPEN_CLI_SCHEMA_VERSION_VALUE;
}
/**
@Override
public String getSchemaVersion() {
- return Constants.ONAP_CMD_SCHEMA_VERSION_VALUE;
+ return Constants.OPEN_CLI_SCHEMA_VERSION_VALUE;
}
public void setSuccessStatusCodes(List<Integer> successStatusCodes) {
public static final String SCOPE = "scope";
- public static final String ONAP_CMD_SCHEMA_VERSION_VALUE = "1.0";
+ public static final String OPEN_CLI_SCHEMA_VERSION_VALUE = "1.0";
public static final String DESCRIPTION = "description";
public static final String SERVICE = "service";
public static final String PARAMETERS = "parameters";
public static final String RESULTS = "results";
- public static final String ONAP_CMD_SCHEMA_VERSION = "onap_cmd_schema_version";
+ public static final String OPEN_CLI_SCHEMA_VERSION = "open_cli_schema_version";
public static final String NAME = "name";
public static final String VERSION = "version";
public static final String BASE_PATH = "base_path";
private static final long serialVersionUID = 4459731110721370387L;
public OnapCommandInvalidSchemaVersion(String schemaVersion) {
- super("0x0008", "Command schema onap_cmd_schema_version " + schemaVersion + " is invalid or missing");
+ super("0x0008", "Command schema open_cli_schema_version " + schemaVersion + " is invalid or missing");
}
}
import static org.onap.cli.fw.conf.Constants.MODE_VALUES;
import static org.onap.cli.fw.conf.Constants.MULTIPART_ENTITY_NAME;
import static org.onap.cli.fw.conf.Constants.NAME;
-import static org.onap.cli.fw.conf.Constants.ONAP_CMD_SCHEMA_VERSION;
+import static org.onap.cli.fw.conf.Constants.OPEN_CLI_SCHEMA_VERSION;
import static org.onap.cli.fw.conf.Constants.PARAMETERS;
import static org.onap.cli.fw.conf.Constants.QUERIES;
import static org.onap.cli.fw.conf.Constants.REQUEST;
throw new OnapCommandInvalidSchema(schemaName, e);
}
String schemaVersion = "";
- if (values.keySet().contains(ONAP_CMD_SCHEMA_VERSION)) {
- Object obj = values.get(ONAP_CMD_SCHEMA_VERSION);
+ if (values.keySet().contains(OPEN_CLI_SCHEMA_VERSION)) {
+ Object obj = values.get(OPEN_CLI_SCHEMA_VERSION);
schemaVersion = obj.toString();
}
schema.setSchemaName(resource.getFilename());
schema.setSchemaURI(resource.getURI().toString());
schema.setCmdName((String) resourceMap.get(NAME));
- Object obj = resourceMap.get(ONAP_CMD_SCHEMA_VERSION);
+ Object obj = resourceMap.get(OPEN_CLI_SCHEMA_VERSION);
schema.setVersion(obj.toString());
schema.setCmdVersion(resourceMap.get(Constants.VERSION).toString());
if (resourceMap.get(Constants.HTTP) != null) {
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
parameters:
- name: onap-username
type: string
-onap_cmd_schema_version: 1.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
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: schema-validate
description: Onap command to validate schema
version: cli-1.0
#cli.service.auth=aaf
#schema validation
-cli.schema.top_level_params_list=onap_cmd_schema_version,name,version,description,service,parameters,results,http
-cli.schema.top_level_mandatory_list=onap_cmd_schema_version
+cli.schema.top_level_params_list=open_cli_schema_version,name,version,description,service,parameters,results,http
+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
public void onapCommandInvalidSchemaVersionTest() {
OnapCommandInvalidSchemaVersion failed = new OnapCommandInvalidSchemaVersion("1.0");
- assertEquals("0x0008::Command schema onap_cmd_schema_version 1.0 is invalid or missing", failed.getMessage());
+ assertEquals("0x0008::Command schema open_cli_schema_version 1.0 is invalid or missing", failed.getMessage());
}
@Test
try {
map = OnapCommandUtils.validateSchemaVersion("sample-test-schema.yaml", "1.1");
} catch (OnapCommandInvalidSchemaVersion e) {
- assertEquals("0x0008::Command schema onap_cmd_schema_version 1.0 is invalid or missing", e.getMessage());
+ assertEquals("0x0008::Command schema open_cli_schema_version 1.0 is invalid or missing", e.getMessage());
} catch (OnapCommandInvalidSchema e) {
fail("Test should not have thrown this exception : " + e.getMessage());
} catch (OnapCommandSchemaNotFound e) {
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test1
description: Onap sample command to test the command features
version: cli-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test
description: Onap sample command to test the command features
verion: cli-1.0
#cli.service.auth=aaf
#schema validation
-cli.schema.top_level_params_list=onap_cmd_schema_version,name,version,description,service,parameters,results,http
-cli.schema.top_level_mandatory_list=onap_cmd_schema_version
+cli.schema.top_level_params_list=open_cli_schema_version,name,version,description,service,parameters,results,http
+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
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
default_parameters:
exclude:
- long
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
default_parameters:
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
default_parameters:
include:
- onap-username
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
default_parameters:
include:
- onap-username
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
default_parameters:
exclude:
- invalid-param
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
default_parameters:
exclude:
- invalid-param-1
\ No newline at end of file
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
default_parameters:
exclude:
- onap-username
\ No newline at end of file
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
service:
auth: none
default_parameters:
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test
description: Onap sample command to test the command features
version: cli-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test
description: Onap sample command to test the command features
version: cli-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test
description: Onap sample command to test the command features
version: cli-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test
description: Onap sample command to test the command features
version: cli-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test
description: Onap sample command to test the command features
version: cli-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-create-http
description: Register microservice into Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test-swagger
description: Sample swagger command test.
version: cli-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test
description: Onap sample command to test the command features
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
description: Register microservice into Onap
name: schema-validate
service:dasd
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
description: Register microservice into Onap
name: schema-validate
service:
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
description: Register microservice into Onap
name: schema-validate
service:
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sdnc-create
description: Register SDNC into Onap
service:
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
description: Register microservice into Onap
name: schema-validate
parameters:
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sdnc-create
description: Register SDNC into Onap
service:
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-create
description: Sample create into Onap
version: cli-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sample-test
description: Onap sample command to test the command features
version: cli-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: cloud-create
description: Create a cloud region in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: cloud-delete
description: Delete a cloud region from Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: cloud-list
description: List the configured clouds and Onap service subscriptions
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: cloud-list
description: List the configured clouds and Onap service subscriptions
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: customer-create
description: Create a customer in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: customer-create
description: Create a customer in Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: customer-delete
description: Delete a customer from Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: customer-delete
description: Delete a customer from Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: customer-list
description: Lists the registetred customers in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: customer-list
description: Lists the registetred customers in Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: customer-show
description: Lists the registetred customers in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: customer-show
description: Lists the registetred customers in Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: ems-register
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: ems-unregister
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: ems-list
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sdnc-register
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sdnc-unregister
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: sdnc-list
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vim-register
description: Register a VIM under a given cloud region in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vim-unregister
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vim-list
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vnfm-register
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vnfm-unregister
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vnfm-list
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: service-type-create
description: Add a service type in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: service-type-create
description: Add a service type in Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: service-type-delete
description: Delete a service type from Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: service-type-delete
description: Delete a service type from Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: service-type-list
description: List the service types configured in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: service-type-list
description: List the service types configured in Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: subscription-create
description: Create a subscription of a customer for given service in specific cloud region in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: subscription-create
description: Create a subscription for a customer in Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: subscription-delete
description: Delete the subscription for a given customer in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: subscription-list
description: Lists the subscription for a given customer in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: subscription-list
description: Lists the subscription for a given customer in Onap
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: tenant-create
description: Create a tenant under given cloud region in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: tenant-delete
description: Delete tenant under given cloud region in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: tenant-list
description: Lists the tenants under given cloud region in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: microservice-create
description: Register microservice into Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: microservice-delete
description: Deletes the micro service from Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: microservice-list
description: Lists the registetred micro services in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: microservice-show
description: Details the registered microservice in Onap
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: service-list
description: Onap Service list
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: user-create
description: Onap user create command.
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vsp-checkin
description: Checkin Vendor Software Product
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vsp-checkout
description: Checkout Vendor Software Product
version: onap-1.1
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vsp-create
description: Create Vendor Software Product
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vsp-list
description: List of the Vendor Software Products
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vsp-show
description: Details of the Vendor Software Product
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vsp-submit
description: Submit Vendor Software Product
version: onap-1.0
-onap_cmd_schema_version: 1.0
+open_cli_schema_version: 1.0
name: vsp-upload
description: Upload the CSAR file to VSP
version: onap-1.0