// removed jquery ui css and js

View Cloud Regions

Details

API Details
Name

View Cloud Regions

Description
MethodGET
URI
  • v1/tenants/tenantId/clouds/cloudId/regions
  • v1/tenants/tenantId/clouds/cloudId/regions/cloudRegionId
CloudCenter Release
  • Introduced in CloudCenter 4.0.
  • Enhanced in CloudCenter 4.5.1 to include the externalActions and externalBundleLocation attributes so you can configure External Service Deployment Lifecycle actions (Pre-VM start, Pre-VM stop, and so forth) at the cloud region level.
Notes
  • For additional context on <PORT> usage in the following example(s), see Base URI Format.
  • The CloudCenter GET APIs display up to 20 entities in the listing by default. If you have more than 20 entities in your resource listing, use the pagination query parameters to view them beyond the first 20 entities returned by default. See the CloudCenter API Overview  > Pagination  section for additional context.
  • If you include a cloudRegionId to identify a cloud region, the response includes information for that cloud region only.
ESB Header
  • action: get.tenants.tenantId.clouds.cloudId.regions
  • action: get.tenants.tenantId.clouds.cloudId.regions.cloudRegionId

Example

curl -k -X GET -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/tenants/1/clouds/20/regions/21"

Response

{
    "id": "21",
    "resource": "https://<HOST>:<PORT>/v1/tenants/1/clouds/20/regions/21/",
    "perms": [],
    "cloudId": "20",
    "displayName": "OpenStack Private Cloud",
    "regionName": "Cliqr-os-sc2",
    "description": "OpenStack Private Cloud",
    "importRegion": null,
    "gateway": {
        "address": "10.10.1.1",
        "dnsName": null,
        "status": "RUNNING",
        "cloudId": "20",
        "cloudAccountId": "1"
    },
    "enabled": true,
    "activated": true,
	"publicCloud": true,
    "numUsers": 18,
    "status": "RUNNING",
    "statusDetail": null,
    "regionProperties": [{
        "name": "InstanceNamingStrategy",
        "value": "CalloutHostname"
    }, {
        "name": "Region",
        "value": "a"
    }, {
        "name": "ExternalBundleLocation",
        "value": ""
    }, {
        "name": "AvailabilityZones",
        "value": ""
    }, {
        "name": "InstanceIPAMStrategy",
        "value": "None"
    }, {
        "name": "NodeNameConfig",
        "value": "%VM_PREFIX%-%os1%-%os2%-%OS1%-%OS2%-%RND7%-%UID%-%VID%"
    }, {
        "name": "Endpoint",
        "value": "http://<HOST>:<PORT>/v2.0"
    }, {
        "name": "NodesPerBatch",
        "value": "50"
    }],
    "externalActions": [{
            "actionName": "POST_VM_INIT",
            "actionType": "CMD",
            "actionValue": "echo \"success launched vm\""
        }

        , {
            "actionName": "PRE_VM_STOP",
            "actionType": "SCRIPT",
            "actionValue": "view10.sh"
        }

        , {
            "actionName": "PRE_VM_INIT",
            "actionType": "URL",
            "actionValue": "%REPO_ID_2%cliqrj/view10.sh"
        }

        , {
            "actionName": "PRE_VM_START",
            "actionType": "SCRIPT",
            "actionValue": "view10.sh"
        }

        , {
            "actionName": "POST_VM_STOP",
            "actionType": "URL",
            "actionValue": "http://<HOST>:<PORT>/cliqrj/view10.sh"
        }

    ],
    "externalBundleLocation": "%REPO_ID_2%cliqrj/cloudregion.zip"
}

 

Request Attributes

tenantId
  • DescriptionUnique, system-generated identifier for the tenant organization. A tenant admin must belong to this tenant to invoke any APIs for this tenant. See Add Sub-Tenants > Tenant ID and Tenant Name Dependency.

  • Type: String

Required

cloudId
  • Description: Unique, system-generated identifier for a cloud representation (see View Deployment Environments for additional details)

  • Type: String

Required

cloudRegionId
  • Description: Unique, system-generated identifier for a cloud region
  • Type: String

Response Attributes

id
  • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

  • Type: String
resource
  • Description: Unique URL to access this resource.
  • Type: String
perms (click for additional information)

cloudId
  • Description: Unique, system-generated identifier for a cloud representation (see View Deployment Environments for additional details)

  • Type: String
displayName
  • DescriptionA descriptive name for this CloudCenter resource.
  • Type: String
regionName
  • DescriptionThe name of this cloud region as listed in Public Clouds.
  • Type: String
description
  • DescriptionA brief description for this CloudCenter Resource.

  • Type: String
importRegion
  • Description: Identified the cloud region details
  • Type: Sequence of attributes

    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    displayName
    • DescriptionA descriptive name for this CloudCenter resource.
    • Type: String

gateway (click for additional details)

storage (click for additional details)

enabled
  • Description: Indicates that this resource has been enabled.

    • true = resource has been enabled
    • false = resource has not been enabled (default)
  • Type: Boolean
activated
  • Description: Indicates whether this account has been activated.

    • true = the account has been activated
    • false = the account has not been activated
  • Type: Boolean
publicCloud
  • Description: Inticates if this is a public cloud. This attribute is useful to identify datacenters and private clouds as features like sync storage and add storage type is not applicable to public clouds.
  • Type: Boolean
numUsers
  • DescriptionNumber of users that are currently using this resource
  • Type: Long
status
  • Description: Status of this resource 
  • Type: Enumeration

    EnumerationDescription
    RUNNINGThe cloud account is operational
    STOPPEDThe cloud account is not operational
statusDetail
  • Description: Indicates the status of this cloud
  • Type: Enumeration

    EnumerationDescription
    CLOUD_ACCOUNT_NOT_CONFIGUREDThere are no cloud accounts configured for this cloud.
    NO_REGION_RUNNINGThe cloud does not have a region that is in running state.
    RUNNINGThe cloud has at least one configured cloud account with at least one cloud region in running state
regionProperties
  • Description: Properties for this region
  • TypeName-Value Pair (array)
externalActions
  • Description: Defines the actions to be defined for each service for each phase when you create/update the service
  • Type: Array of Service Lifecycle Actions

    actionName
    • Type: Enumeration
    actionType
    • Description: The value of this attribute is interpreted based on the value of the actionName attribute for this Service Lifecycle Action.
    • Type: Enumeration

      EnumerationDescription
      SCRIPT

      Indicates the script (baked into the image that is used to launch the VM) name and parameters (if any) to be executed on the VM during the corresponding actionName step.

      The entity to be run for this Service Lifecycle Action is a script located at a path relative to where the service bundle zip file is extracted:
      - Linux VMs = /usr/local/osmosix/service/serviceName
      - Windows VMs = C:\program files\osmosix\service\$SERVICE_NAME

       
      URLIndicates the location from where the script is to be downloaded and executed on the VM during the corresponding actionName step.

      The entity to be run for this Service Lifecycle Action is a HTTP URL pointing to a script that is downloaded (the HTTP URL must be accessible from this VM).
      CMD

      Indicates the command that is be executed on the VM during actionName step.

      The entity to be run for this Service Lifecycle Action is a command that is accessible in the PATH for the user (built into the image that is used to launch the VMs):

      - Linux VMs = cliqruser

      - WindowsVMs = cliqr

      Effective CloudCenter 4.1.1, admins can configure the local user on application VMs. The CCO configuration file (/usr/local/osmosix/etc/gateway_config.properties) has an optional property called agent.username to specify the local user. If no user name is specified then cliqruser is the default user.

    actionValue
    • Description: Identifies the value that you provide for the selected actionType.

    • Type: String

 externalBundleLocation
  • Description: Location of the zip file that contains the external Bundle Store artifacts that are downloaded during deployment orchestration. 
    • The External Actions Bundle zip file contains all scripts required to manage the external lifecycle. You must provide the following information for this zip file depending on the resource being configured:

      • If you are configuring this file at the cloud region level – this file must contain a directory called cloudregion which contains all the scripts.

      • If you are configuring this file for a service – name this file as ServiceID.zip. For example, tomcat6.zip, where tomcat6 is the Service ID.

    • This attribute is available for all service types
    • The bundle is validated against associated repositories.
    • The repositories field should not be empty.
    • The Service Lifecycle Actions definition (if it is a SCRIPT) is used to locate the scripts in this ZIP file.
    • See Manage Services and Parameters and Macros for additional context.
  • Type: String

 

 

© 2017 Cisco Systems