Github user lahirus commented on a diff in the pull request: https://github.com/apache/stratos/pull/403#discussion_r35230789 --- Diff: components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java --- @@ -24,281 +24,267 @@ public final class CloudControllerConstants { - /** - * cloud-controller XML file's elements - */ - public static final String CLOUD_CONTROLLER_ELEMENT = "cloudController"; - public static final String SERIALIZATION_DIR_ELEMENT = "serializationDir"; - public static final String IAAS_PROVIDERS_ELEMENT = "iaasProviders"; - public static final String IAAS_PROVIDER_ELEMENT = "iaasProvider"; - public static final String PARTITION_ELEMENT = "partition"; - public static final String PARTITIONS_ELEMENT = "partitions"; - public static final String REGION_ELEMENT = "region"; - public static final String ZONE_ELEMENT = "zone"; - public static final String DEPLOYMENT_ELEMENT = "deployment"; - public static final String PORT_MAPPING_ELEMENT = "portMapping"; - public static final String APP_TYPES_ELEMENT = "appTypes"; - public static final String TYPE_ATTR = "type"; - public static final String HOST_ATTR = "host"; - public static final String BASE_DIR_ATTR = "baseDir"; - public static final String PROVIDER_ATTR = "provider"; - public static final String VERSION_ATTR = "version"; - public static final String MULTI_TENANT_ATTR = "multiTenant"; - public static final String PORT_ATTR = "port"; - public static final String PROXY_PORT_ATTR = "proxyPort"; - public static final String NAME_ATTR = "name"; - public static final String APP_SPECIFIC_MAPPING_ATTR = "appSpecificMapping"; + /** + * cloud-controller XML file's elements + */ + public static final String CLOUD_CONTROLLER_ELEMENT = "cloudController"; + public static final String SERIALIZATION_DIR_ELEMENT = "serializationDir"; + public static final String IAAS_PROVIDERS_ELEMENT = "iaasProviders"; + public static final String IAAS_PROVIDER_ELEMENT = "iaasProvider"; + public static final String PARTITION_ELEMENT = "partition"; + public static final String PARTITIONS_ELEMENT = "partitions"; + public static final String REGION_ELEMENT = "region"; + public static final String ZONE_ELEMENT = "zone"; + public static final String DEPLOYMENT_ELEMENT = "deployment"; + public static final String PORT_MAPPING_ELEMENT = "portMapping"; + public static final String APP_TYPES_ELEMENT = "appTypes"; + public static final String TYPE_ATTR = "type"; + public static final String HOST_ATTR = "host"; + public static final String BASE_DIR_ATTR = "baseDir"; + public static final String PROVIDER_ATTR = "provider"; + public static final String VERSION_ATTR = "version"; + public static final String MULTI_TENANT_ATTR = "multiTenant"; + public static final String PORT_ATTR = "port"; + public static final String PROXY_PORT_ATTR = "proxyPort"; + public static final String NAME_ATTR = "name"; + public static final String APP_SPECIFIC_MAPPING_ATTR = "appSpecificMapping"; - public static final String CARTRIDGES_ELEMENT = "cartridges"; - public static final String CARTRIDGE_ELEMENT = "cartridge"; + public static final String CARTRIDGES_ELEMENT = "cartridges"; + public static final String CARTRIDGE_ELEMENT = "cartridge"; - public static final String DISPLAY_NAME_ELEMENT = "displayName"; - public static final String DESCRIPTION_ELEMENT = "description"; - public static final String PROPERTY_ELEMENT = "property"; - public static final String PROPERTY_NAME_ATTR = "name"; - public static final String PROPERTY_VALUE_ATTR = "value"; - public static final String IMAGE_ID_ELEMENT = "imageId"; - public static final String SCALE_DOWN_ORDER_ELEMENT = "scaleDownOrder"; - public static final String SCALE_UP_ORDER_ELEMENT = "scaleUpOrder"; - public static final String CLASS_NAME_ELEMENT = "className"; - public static final String PROVIDER_ELEMENT = "provider"; - public static final String IDENTITY_ELEMENT = "identity"; - public static final String TYPE_ELEMENT = "type"; - public static final String SCOPE_ELEMENT = "scope"; - public static final String ID_ELEMENT = "id"; - public static final String CREDENTIAL_ELEMENT = "credential"; - public static final String DEFAULT_SERVICE_ELEMENT = "default"; - public static final String SERVICE_ELEMENT = "service"; - public static final String SERVICES_ELEMENT = "services"; - public static final String DIRECTORY_ELEMENT = "dir"; - public static final String HTTP_ELEMENT = "http"; - public static final String HTTPS_ELEMENT = "https"; - public static final String APP_TYPE_ELEMENT = "appType"; - public static final String SERVICE_DOMAIN_ATTR = "domain"; - public static final String SERVICE_SUB_DOMAIN_ATTR = "subDomain"; - public static final String SERVICE_TENANT_RANGE_ATTR = "tenantRange"; - public static final String POLICY_NAME = "policyName"; - public static final String PAYLOAD_ELEMENT = "payload"; - public static final String DATA_PUBLISHER_ELEMENT = "dataPublisher"; - public static final String TOPOLOGY_SYNC_ELEMENT = "topologySync"; - public static final String ENABLE_ATTR = "enable"; - public static final String BAM_SERVER_ELEMENT = "bamServer"; - public static final String CRON_ELEMENT = "cron"; - public static final String BAM_SERVER_ADMIN_USERNAME_ELEMENT = "adminUserName"; - public static final String BAM_SERVER_ADMIN_PASSWORD_ELEMENT = "adminPassword"; - public static final String CASSANDRA_INFO_ELEMENT = "cassandraInfo"; - public static final String HOST_ELEMENT = "host"; - public static final String CONNECTION_URL_ELEMENT = "connectionUrl"; - public static final String HOST_PORT_ELEMENT = "port"; - public static final String USER_NAME_ELEMENT = "userName"; - public static final String PASSWORD_ELEMENT = "password"; - public static final String CLOUD_CONTROLLER_EVENT_STREAM = "org.apache.stratos.cloud.controller"; - public static final String CLOUD_CONTROLLER_COL_FAMILY = CLOUD_CONTROLLER_EVENT_STREAM - .replaceAll("[/.]", "_"); + public static final String DISPLAY_NAME_ELEMENT = "displayName"; + public static final String DESCRIPTION_ELEMENT = "description"; + public static final String PROPERTY_ELEMENT = "property"; + public static final String PROPERTY_NAME_ATTR = "name"; + public static final String PROPERTY_VALUE_ATTR = "value"; + public static final String IMAGE_ID_ELEMENT = "imageId"; + public static final String SCALE_DOWN_ORDER_ELEMENT = "scaleDownOrder"; + public static final String SCALE_UP_ORDER_ELEMENT = "scaleUpOrder"; + public static final String CLASS_NAME_ELEMENT = "className"; + public static final String PROVIDER_ELEMENT = "provider"; + public static final String IDENTITY_ELEMENT = "identity"; + public static final String TYPE_ELEMENT = "type"; + public static final String SCOPE_ELEMENT = "scope"; + public static final String ID_ELEMENT = "id"; + public static final String CREDENTIAL_ELEMENT = "credential"; + public static final String DEFAULT_SERVICE_ELEMENT = "default"; + public static final String SERVICE_ELEMENT = "service"; + public static final String SERVICES_ELEMENT = "services"; + public static final String DIRECTORY_ELEMENT = "dir"; + public static final String HTTP_ELEMENT = "http"; + public static final String HTTPS_ELEMENT = "https"; + public static final String APP_TYPE_ELEMENT = "appType"; + public static final String SERVICE_DOMAIN_ATTR = "domain"; + public static final String SERVICE_SUB_DOMAIN_ATTR = "subDomain"; + public static final String SERVICE_TENANT_RANGE_ATTR = "tenantRange"; + public static final String POLICY_NAME = "policyName"; + public static final String PAYLOAD_ELEMENT = "payload"; + public static final String DATA_PUBLISHER_ELEMENT = "dataPublisher"; + public static final String TOPOLOGY_SYNC_ELEMENT = "topologySync"; + public static final String ENABLE_ATTR = "enable"; + public static final String BAM_SERVER_ELEMENT = "bamServer"; + public static final String CRON_ELEMENT = "cron"; + public static final String BAM_SERVER_ADMIN_USERNAME_ELEMENT = "adminUserName"; + public static final String BAM_SERVER_ADMIN_PASSWORD_ELEMENT = "adminPassword"; + public static final String CASSANDRA_INFO_ELEMENT = "cassandraInfo"; + public static final String HOST_ELEMENT = "host"; + public static final String CONNECTION_URL_ELEMENT = "connectionUrl"; + public static final String HOST_PORT_ELEMENT = "port"; + public static final String USER_NAME_ELEMENT = "userName"; + public static final String PASSWORD_ELEMENT = "password"; + public static final String CLOUD_CONTROLLER_EVENT_STREAM = "org.apache.stratos.cloud.controller"; + public static final String CLOUD_CONTROLLER_COL_FAMILY = CLOUD_CONTROLLER_EVENT_STREAM.replaceAll("[/.]", "_"); - /** - * column names - */ - public static final String PAYLOAD_PREFIX = "payload_"; - public static final String MEMBER_ID_COL = "memberId"; - public static final String CARTRIDGE_TYPE_COL = "cartridgeType"; - public static final String CLUSTER_ID_COL = "clusterId"; - public static final String PARTITION_ID_COL = "partitionId"; - public static final String NETWORK_ID_COL = "networkId"; - public static final String ALIAS_COL = "alias"; - public static final String TENANT_RANGE_COL = "tenantRange"; - public static final String IS_MULTI_TENANT_COL = "isMultiTenant"; - public static final String IAAS_COL = "iaas"; - public static final String STATUS_COL = "status"; - public static final String HOST_NAME_COL = "hostName"; - public static final String HYPERVISOR_COL = "hypervisor"; - public static final String RAM_COL = "ram"; - public static final String IMAGE_ID_COL = "imageId"; - public static final String LOGIN_PORT_COL = "loginPort"; - public static final String OS_NAME_COL = "osName"; - public static final String OS_VERSION_COL = "osVersion"; - public static final String OS_ARCH_COL = "osArch"; - public static final String OS_BIT_COL = "is64bitOS"; - public static final String PRIV_IP_COL = "privateIPAddresses"; - public static final String PUB_IP_COL = "publicIPAddresses"; - public static final String ALLOCATE_IP_COL = "allocateIPAddresses"; + /** + * column names + */ + public static final String PAYLOAD_PREFIX = "payload_"; + public static final String MEMBER_ID_COL = "memberId"; + public static final String CARTRIDGE_TYPE_COL = "cartridgeType"; + public static final String CLUSTER_ID_COL = "clusterId"; + public static final String CLUSTER_INSTANCE_ID_COL = "clusterInstanceId"; + public static final String PARTITION_ID_COL = "partitionId"; + public static final String NETWORK_ID_COL = "networkId"; + public static final String ALIAS_COL = "alias"; + public static final String TENANT_RANGE_COL = "tenantRange"; + public static final String IS_MULTI_TENANT_COL = "isMultiTenant"; + public static final String IAAS_COL = "iaas"; + public static final String STATUS_COL = "status"; + public static final String HOST_NAME_COL = "hostName"; + public static final String HYPERVISOR_COL = "hypervisor"; + public static final String RAM_COL = "ram"; + public static final String IMAGE_ID_COL = "imageId"; + public static final String LOGIN_PORT_COL = "loginPort"; + public static final String OS_NAME_COL = "osName"; + public static final String OS_VERSION_COL = "osVersion"; + public static final String OS_ARCH_COL = "osArch"; + public static final String OS_BIT_COL = "is64bitOS"; + public static final String PRIV_IP_COL = "privateIPAddresses"; + public static final String PUB_IP_COL = "publicIPAddresses"; + public static final String ALLOCATE_IP_COL = "allocateIPAddresses"; + public static final String TIME_STAMP = "timeStamp"; + public static final String SCALING_REASON = "scalingReason"; + public static final String SCALING_TIME = "scalingTime"; - /** - * Properties - */ - public static final String REGION_PROPERTY = "region"; - public static final String TOPICS_PROPERTY = "topics"; - public static final String PUBLIC_IP_PROPERTY = "public_ip"; - public static final String TENANT_ID_PROPERTY = "tenant_id"; - public static final String ALIAS_PROPERTY = "alias"; - public static final String AUTO_ASSIGN_IP_PROPERTY = "autoAssignIp"; - public static final String JCLOUDS_ENDPOINT = "jclouds.endpoint"; - public static final String CRON_PROPERTY = "cron"; - public static final String AMQP_CONNECTION_URL_PROPERTY = "amqpConnectionUrl"; - public static final String AMQP_INITIAL_CONTEXT_FACTORY_PROPERTY = "amqpInitialContextFactory"; - public static final String AMQP_TOPIC_CONNECTION_FACTORY_PROPERTY = "amqpTopicConnectionFactory"; - public static final String INSTANCE_TOPIC = "instance/*"; - // pre define a floating ip - public static final String FLOATING_IP_PROPERTY = "floatingIp"; - public static final String DEFAULT_FLOATING_IP_POOL = "defaultFloatingIpPool"; - public static final String OPENSTACK_NETWORKING_PROVIDER = "openstack.networking.provider"; - public static final String OPENSTACK_NEUTRON_NETWORKING = "neutron"; + /** + * Properties + */ + public static final String REGION_PROPERTY = "region"; + public static final String TOPICS_PROPERTY = "topics"; + public static final String PUBLIC_IP_PROPERTY = "public_ip"; + public static final String TENANT_ID_PROPERTY = "tenant_id"; + public static final String ALIAS_PROPERTY = "alias"; + public static final String AUTO_ASSIGN_IP_PROPERTY = "autoAssignIp"; + public static final String JCLOUDS_ENDPOINT = "jclouds.endpoint"; + public static final String CRON_PROPERTY = "cron"; + public static final String AMQP_CONNECTION_URL_PROPERTY = "amqpConnectionUrl"; + public static final String AMQP_INITIAL_CONTEXT_FACTORY_PROPERTY = "amqpInitialContextFactory"; + public static final String AMQP_TOPIC_CONNECTION_FACTORY_PROPERTY = "amqpTopicConnectionFactory"; + public static final String INSTANCE_TOPIC = "instance/*"; + // pre define a floating ip + public static final String FLOATING_IP_PROPERTY = "floatingIp"; + public static final String DEFAULT_FLOATING_IP_POOL = "defaultFloatingIpPool"; + public static final String OPENSTACK_NETWORKING_PROVIDER = "openstack.networking.provider"; + public static final String OPENSTACK_NEUTRON_NETWORKING = "neutron"; - /** - * XPath expressions - */ - public static final String IAAS_PROVIDER_XPATH = "/" - + CLOUD_CONTROLLER_ELEMENT + "/" + IAAS_PROVIDERS_ELEMENT + "/" - + IAAS_PROVIDER_ELEMENT; - public static final String PARTITION_XPATH = "/" + CLOUD_CONTROLLER_ELEMENT - + "/" + PARTITIONS_ELEMENT + "/" + PARTITION_ELEMENT; - public static final String REGION_XPATH = "/" + CLOUD_CONTROLLER_ELEMENT - + "/" + IAAS_PROVIDERS_ELEMENT + "/" + IAAS_PROVIDER_ELEMENT + "/" - + REGION_ELEMENT; - public static final String ZONE_XPATH = "/" + CLOUD_CONTROLLER_ELEMENT - + "/" + IAAS_PROVIDERS_ELEMENT + "/" + IAAS_PROVIDER_ELEMENT + "/" - + REGION_ELEMENT + "/" + ZONE_ELEMENT; - public static final String HOST_XPATH = "/" + CLOUD_CONTROLLER_ELEMENT - + "/" + IAAS_PROVIDERS_ELEMENT + "/" + IAAS_PROVIDER_ELEMENT + "/" - + REGION_ELEMENT + "/" + ZONE_ELEMENT + "/" + HOST_ELEMENT; - public static final String PROPERTY_ELEMENT_XPATH = "/" + PROPERTY_ELEMENT; - public static final String IMAGE_ID_ELEMENT_XPATH = "/" + IMAGE_ID_ELEMENT; - public static final String SCALE_UP_ORDER_ELEMENT_XPATH = "/" - + SCALE_UP_ORDER_ELEMENT; - public static final String SCALE_DOWN_ORDER_ELEMENT_XPATH = "/" - + SCALE_DOWN_ORDER_ELEMENT; - public static final String PROVIDER_ELEMENT_XPATH = "/" + PROPERTY_ELEMENT; - public static final String IDENTITY_ELEMENT_XPATH = "/" + IDENTITY_ELEMENT; - public static final String CREDENTIAL_ELEMENT_XPATH = "/" - + CREDENTIAL_ELEMENT; - public static final String SERVICES_ELEMENT_XPATH = "/" + SERVICES_ELEMENT - + "/" + SERVICE_ELEMENT; - public static final String SERVICE_ELEMENT_XPATH = "/" + SERVICE_ELEMENT; - public static final String CARTRIDGE_ELEMENT_XPATH = "/" - + CARTRIDGE_ELEMENT; - public static final String PAYLOAD_ELEMENT_XPATH = "/" + PAYLOAD_ELEMENT; - public static final String HOST_ELEMENT_XPATH = "/" + HOST_ELEMENT; - public static final String CARTRIDGES_ELEMENT_XPATH = "/" - + CARTRIDGES_ELEMENT + "/" + CARTRIDGE_ELEMENT; - public static final String IAAS_PROVIDER_ELEMENT_XPATH = "/" - + IAAS_PROVIDER_ELEMENT; - public static final String DEPLOYMENT_ELEMENT_XPATH = "/" - + DEPLOYMENT_ELEMENT; - public static final String PORT_MAPPING_ELEMENT_XPATH = "/" - + PORT_MAPPING_ELEMENT; - public static final String APP_TYPES_ELEMENT_XPATH = "/" - + APP_TYPES_ELEMENT; + /** + * XPath expressions + */ + public static final String IAAS_PROVIDER_XPATH = + "/" + CLOUD_CONTROLLER_ELEMENT + "/" + IAAS_PROVIDERS_ELEMENT + "/" + IAAS_PROVIDER_ELEMENT; + public static final String PARTITION_XPATH = + "/" + CLOUD_CONTROLLER_ELEMENT + "/" + PARTITIONS_ELEMENT + "/" + PARTITION_ELEMENT; + public static final String REGION_XPATH = + "/" + CLOUD_CONTROLLER_ELEMENT + "/" + IAAS_PROVIDERS_ELEMENT + "/" + IAAS_PROVIDER_ELEMENT + "/" + + REGION_ELEMENT; + public static final String ZONE_XPATH = + "/" + CLOUD_CONTROLLER_ELEMENT + "/" + IAAS_PROVIDERS_ELEMENT + "/" + IAAS_PROVIDER_ELEMENT + "/" + + REGION_ELEMENT + "/" + ZONE_ELEMENT; + public static final String HOST_XPATH = + "/" + CLOUD_CONTROLLER_ELEMENT + "/" + IAAS_PROVIDERS_ELEMENT + "/" + IAAS_PROVIDER_ELEMENT + "/" + + REGION_ELEMENT + "/" + ZONE_ELEMENT + "/" + HOST_ELEMENT; + public static final String PROPERTY_ELEMENT_XPATH = "/" + PROPERTY_ELEMENT; + public static final String IMAGE_ID_ELEMENT_XPATH = "/" + IMAGE_ID_ELEMENT; + public static final String SCALE_UP_ORDER_ELEMENT_XPATH = "/" + SCALE_UP_ORDER_ELEMENT; + public static final String SCALE_DOWN_ORDER_ELEMENT_XPATH = "/" + SCALE_DOWN_ORDER_ELEMENT; + public static final String PROVIDER_ELEMENT_XPATH = "/" + PROPERTY_ELEMENT; + public static final String IDENTITY_ELEMENT_XPATH = "/" + IDENTITY_ELEMENT; + public static final String CREDENTIAL_ELEMENT_XPATH = "/" + CREDENTIAL_ELEMENT; + public static final String SERVICES_ELEMENT_XPATH = "/" + SERVICES_ELEMENT + "/" + SERVICE_ELEMENT; + public static final String SERVICE_ELEMENT_XPATH = "/" + SERVICE_ELEMENT; + public static final String CARTRIDGE_ELEMENT_XPATH = "/" + CARTRIDGE_ELEMENT; + public static final String PAYLOAD_ELEMENT_XPATH = "/" + PAYLOAD_ELEMENT; + public static final String HOST_ELEMENT_XPATH = "/" + HOST_ELEMENT; + public static final String CARTRIDGES_ELEMENT_XPATH = "/" + CARTRIDGES_ELEMENT + "/" + CARTRIDGE_ELEMENT; + public static final String IAAS_PROVIDER_ELEMENT_XPATH = "/" + IAAS_PROVIDER_ELEMENT; + public static final String DEPLOYMENT_ELEMENT_XPATH = "/" + DEPLOYMENT_ELEMENT; + public static final String PORT_MAPPING_ELEMENT_XPATH = "/" + PORT_MAPPING_ELEMENT; + public static final String APP_TYPES_ELEMENT_XPATH = "/" + APP_TYPES_ELEMENT; - public static final String DATA_PUBLISHER_XPATH = "/" - + CLOUD_CONTROLLER_ELEMENT + "/" + DATA_PUBLISHER_ELEMENT; - public static final String TOPOLOGY_SYNC_XPATH = "/" - + CLOUD_CONTROLLER_ELEMENT + "/" + TOPOLOGY_SYNC_ELEMENT; - public static final String DATA_PUBLISHER_CRON_XPATH = "/" - + CLOUD_CONTROLLER_ELEMENT + "/" + CRON_ELEMENT; - public static final String BAM_SERVER_ADMIN_USERNAME_XPATH = "/" - + CLOUD_CONTROLLER_ELEMENT + "/" - + BAM_SERVER_ADMIN_USERNAME_ELEMENT; - public static final String BAM_SERVER_ADMIN_PASSWORD_XPATH = "/" - + CLOUD_CONTROLLER_ELEMENT + "/" - + BAM_SERVER_ADMIN_PASSWORD_ELEMENT; - // public static final String CASSANDRA_HOST_ADDRESS_XPATH = - // "/"+CLOUD_CONTROLLER_ELEMENT+ - // "/"+CASSANDRA_HOST_ADDRESS; - // public static final String CASSANDRA_HOST_PORT_XPATH = - // "/"+CLOUD_CONTROLLER_ELEMENT+ - // "/"+CASSANDRA_HOST_PORT; + public static final String DATA_PUBLISHER_XPATH = "/" + CLOUD_CONTROLLER_ELEMENT + "/" + DATA_PUBLISHER_ELEMENT; + public static final String TOPOLOGY_SYNC_XPATH = "/" + CLOUD_CONTROLLER_ELEMENT + "/" + TOPOLOGY_SYNC_ELEMENT; + public static final String DATA_PUBLISHER_CRON_XPATH = "/" + CLOUD_CONTROLLER_ELEMENT + "/" + CRON_ELEMENT; + public static final String BAM_SERVER_ADMIN_USERNAME_XPATH = + "/" + CLOUD_CONTROLLER_ELEMENT + "/" + BAM_SERVER_ADMIN_USERNAME_ELEMENT; + public static final String BAM_SERVER_ADMIN_PASSWORD_XPATH = + "/" + CLOUD_CONTROLLER_ELEMENT + "/" + BAM_SERVER_ADMIN_PASSWORD_ELEMENT; + // public static final String CASSANDRA_HOST_ADDRESS_XPATH = --- End diff -- Remove commented lines.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---