OpenTelekomCloud JS micro-SDK
This is JS SDK designed mostly for internal usage and for Rancher drivers' UI part (https://github.com/opentelekomcloud/ui-cluster-driver-otc)
Supports ak/sk
, token
, and username/password
authentication.
- Compute:
- V1:
- List all available flavors by
listFlavors
- List all available flavors by
- V2:
- List all available for user Keypairs by
listKeyPairs
- List all available for user Keypairs by
- V1:
- Identity:
- V3:
- List available service endpoints by
listEndpoints
- Create permanent AK/SK by
getAKSK
- List available service catalog by
listCatalog
- List available projects (tenants) by
listProjects
- List available services by
listServices
- Get permanent auth token by
issueToken
- List available service endpoints by
- V3:
- Image:
- V2:
- List all available images by
listImages
- List all available images by
- V2:
- Network
- Get list of all existing VPCs by
listVPCs
- Create new VPC by
createVPC
- Get existing VPC details by
getVPC
- Update existing VPC by
updateVPC
- Delete existing VPC by
deleteVPC
- List existing subnets by
listSubnets
- Get existing subnet by ID by
getSubnet
- Create new subnet with given opts by
createSubnet
- Delete existing subnet by ID by
deleteSubnet
- List existing security groups by
listSecurityGroups
- Create new security group by
createSecurityGroup
- Delete existing security group by
deleteSecurityGroup
- List all public IPs assigned to the project by
listPublicIPs
- Get list of all existing VPCs by
- Object-storage
- V1:
- Get AccountMetadata details and container list by
getAccount
- Get AccountMetadata details by
showAccountMetadata
- Update account metadata by
updateAccountMetadata
- Create container by
createContainer
- List all containers by
listContainers
- Show container metadata by
showContainerMetadata
- List container objects by
getContainer
- Delete container by
deleteContainer
- Get AccountMetadata details and container list by
- V1:
-
Create cloud config with necessary with auth url:
const authUrl = "https://iam.eu-de.otc.t-systems.com/v3"
const config = cloud(authUrl)
-
Add auth type:
-
With AK/SK and Project:
config.withAKSK("ak", "sk").withProject("projectName")
-
With Auth token:
config.withToken("token")
-
With username and password (
region
here is mandatory):config.withRegion("region").withProject("projectName").withPassword("domainName", "username", "password")
-
-
Create client form config:
const client = new Client(config.config)
await client.authenticate()
const catalog = await client.getService(IdentityV3).listCatalog()
Minimal usage example can be found at https://github.com/opentelekomcloud-blueprints/oms-example
Copyright 2023 T-Systems GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.