No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FusionCloud 6.3.1.1 Troubleshooting Guide 02

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Appendix

Appendix

Instructions for Postman

Function

You are allowed to invoke an API using the Postman tool.

Postman is a free Chrome browser plugin used for API tests. Install it at https://www.getpostman.com/.

Procedure
  1. Set a complete URL in the URL bar and replace {tenant_id} with the domain ID of the resource tenant.

    Figure 20-4 Example

  2. Add the request parameter X-Auth-Token. Its value is token of the resource tenant. For details on how to obtain a token, see Obtaining a Token.
  3. Add a request body. In the body, the ID indicates the cloud host ID, and you can query it by running the following SQLs in the rds database.

    1. Obtain tenantId.
      select realDomainName,realDomainId from rds_restenant where realDomainName = 'Tenant name';
      NOTE:

      The tenant name is the name of the current user logged in to the system.

    2. Obtain instanceId.
      select id,name,type,status from rds_instance as ri where name = 'Instance name' and tenantId = 'tenantId';
      NOTE:
      • Primary/standby DB instances have two instance IDs. The value of type for the primary instance is master, and that for the standby instance is slave. The value of type for a single instance is master, and that for a read replica is readreplica.
      • Among multiple instance IDs, identify each of them with their status. The status of only one group of instance is 200, indicating the instance is running. 300 indicates failures, and 400 indicates the instance has been deleted.
      • tenantId is the value of realDomainId in SQL that you obtained in 3.a.
    1. Obtain the ID of the cloud host.
      select id from rds_resource as r
      where r.instId = 'instanceId'
      and (select resTypeCode from rds_resspec as rs where rs.id = r.specId) like '%vm%';

  4. Click Save, and then click Send to send a request. The response is as follows:

    Figure 20-5 Response

Obtaining an AK and an SK

Connect to the RDSMetastore, and perform the following steps to obtain an access key (AK) and a secret access key (SK).

  1. Query the resUserId of an instance by instance name.
    select name,resUserId,id,type,status from rds_instance where name = 'Instance name';
  2. Query the AK and SK of the instance by resUserId.
    select userId,name,ak,sk,resTenantName from rds_resuser where userId = 'resUserId';
    NOTE:

    Only users who have successfully created an instance can query the AK and SK in the rds_resuser table.

Obtaining a Token

Function

You are allowed to authenticate the user information using the token.

URL
  • Path

    Value of iamEndpoint specifies the name in the rds_sysparam table of the RDSMetastore.

  • API format

    POST method: /v3/auth/tokens

  • Parameter description
    Table 20-1 Parameter description

    Name

    Field Data Structure

    Type

    Description

    auth

    identity

    methods

    None

    String

    The value is ["password"].

    password

    user

    name

    None

    Specifies the tenant name.

    password

    None

    Specifies the tenant password.

    domain

    name

    Specifies the tenant name.

    scope

    project

    name

    None

    None

    Specifies the name of the domain that a user belongs to.

    domain

    name

    None

    Specifies the name of the domain that a user belongs to.

  • Example of a URL
https://Endpoint/v3/auth/tokens
Requests

Description for the request body

{
   "auth": {
         "identity": {
              "methods": [
                   "password"
               ],
              "password": {
                   "user": {
                       "id": "0ca8f6", // If you select name, add the domain information under password.
                        "password": "secrete"
                    }
               }
         },
    "scope": { // Each Token must be associated with a project or domain. Otherwise, the default project is used.
       "project": { // Select a project and domain. The project is preferred.
            "id": "263fd9", // Select an ID and a name. The name is preferred.
            "name": "espace", // name can specify the domain information, if not, use the domain information to which the user belongs.
            "domain": {
                "id": "default", // Select an ID and a name. name is preferred.
                "name": "default"
             }
         },
         "domain": {
            "id": "default", // Select an ID and a name. name is preferred.
            "name: "default"
         }
      }
    }
}

Request examples

{
     "auth":{
          "identity":{
               "methods":[
                    "password"
                ],
               "password":{
                   "user":{
                        "name":"rds09",
                        "password":"Huawei@123",
                        "domain":{
                             "name":"rds09"
                        }
                     }
                }
          },
          "scope":{
              "project":{
                    "name":"southchina",
                    "domain":{
                         "name":"rds09"
                    }
               }
          }
      }
}
Response

Response example

{
     "token": {
         "expires_at": "2016-06-14T03:15:58.027000Z",
         "issued_at": "2016-06-13T03:15:58.027000Z",
         "methods": [
              "password"
          ],
         "project": {
              "name": "southchina",
              "id": "2ce1e83aab174e62a7f07e06ae712a99",
              "domain": {
                  "name": "rds09",
                  "id": "106757caea8c4fc6b9c5ad5a0669ed49"
               }
          },
         "user": {
             "domain": {
                  "name": "rds09",
                  "id": "106757caea8c4fc6b9c5ad5a0669ed49"
              },
              "id": "75af1d667d1142c3b23a6e1710f4422a",
              "name": "rds09"
         },
         "catalog": [],
         "roles": [
              {
                  "name": "te_admin",
                  "id": "1992c1df9ad6412e9c833032cd70ca8f"
              },
              {
                    "id": "0",
                    "name": "op_gated_codehub"
               },
               {
                    "id": "0",
                    "name": "op_gated_testman"
               },
               {
                    "id": "0",
                    "name": "op_gated_releaseman"
               },
               {
                    "id": "0",
                    "name": "op_gated_RDS"
                },
               {
                     "name": "op_gated_codeci"
               },
               {
                    "id": "0",
                    "name": "op_gated_projectman"
                },
                {
                     "id": "0",
                     "name": "op_gated_codecheck"
                },
                {
                   "id": "0",
                   "name": "op_gated_VBS999"
                },
                {
                     "id": "0",
                     "name": "op_gated_vpn"
               },
               {
                   "id": "0",
                     "name": "op_op_gated_vpn"
                },
                {
                     "id": "0",
                    "name": "op_gated_VBS666"
                 },
                 {
                     "id": "0",
                    "name": "op_gated_RDS_GC666666"
                 },
                 {
                    "id": "0",
                    "name": "op_gated_recharge"
                 },
                 {
                     "id": "0",
                      "name": "op_gated_firewall"
                 },
                 {
                      "id": "0",
                      "name": "op_gated_shared_bandwitdh"
                 },
                 {
                     "id": "0",
                     "name": "op_gated_devcloud"
                 },
                 {
                      "id": "0",
                      "name": "op_gated_RDS_GC8888"
                 },
                 {
                      "id": "0",
                      "name": "op_gated_rds_del"
                 },
                 {
                     "id": "0",
                     "name": "op_gated_GC321"
                 },
                 {
                     "id": "0",
                     "name": "op_gated_RDS-test"
                 },
                 {
                     "id": "0",
                     "name": "op_gated_emr"
                 },
                 {
                   "id": "0",
                     "name": "op_gated_vbs"
                 },
                 {
                     "id": "0",
                   "name": "op_gated_autobackup"
                 },
                 {
                     "id": "0",
                     "name": "op_gated_bigdata"
                 },
                 {
                     "id": "0",
                     "name": "op_gated_cae"
                 },
                 {
                     "id": "0",
                     "name": "op_legacy"
                 }
              ]
      }
}
Translation
Download
Updated: 2019-06-10

Document ID: EDOC1100063248

Views: 23289

Downloads: 37

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next