Virtual machine 在Bluemix中访问Openstack API
对于Bluemix中的VM功能,是否可以使用OpenStack API?如果是,您如何访问它 我正在尝试使用以下URL:Virtual machine 在Bluemix中访问Openstack API,virtual-machine,openstack,ibm-cloud,Virtual Machine,Openstack,Ibm Cloud,对于Bluemix中的VM功能,是否可以使用OpenStack API?如果是,您如何访问它 我正在尝试使用以下URL: (POST)使用此有效载荷: {"auth": { "tenantName": "myTenant", "passwordCredentials": {"username": "myUser", "password": "myPwd"} } } (POST)使用此有效载荷: { "auth": { "identity": { "methods":
- (POST)使用此有效载荷:
{"auth": { "tenantName": "myTenant", "passwordCredentials": {"username": "myUser", "password": "myPwd"} } }
- (POST)使用此有效载荷:
{ "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "id": "myID", "password": "myPWD" } } } } }
error: {
message: "KS-58299FC La requête que vous avez faite nécessite une authentification."
code: 401
title: "Unauthorized"
}
我犯了什么错
提前感谢。您需要使用OpenStack凭据而不是Bluemix ID登录。要查看这些凭据,请在Bluemix仪表板中,转到管理组织>管理基础架构,然后选择显示凭据。它将显示类似以下内容的数据:
{
"auth_url": "https://keystone2.open.ibmcloud.com",
"tenant": "TENANT",
"credentials": {
"username": "USER",
"password": "PWD"
}
}
然后使用您拥有的主体运行命令,但使用以下凭据:
{"auth": {
"tenantName": "TENANT",
"passwordCredentials": {"username": "USER", "password": "PWD"}
} }
如果要获取身份验证令牌,这应该是POST正文的外观:
{
"auth": {
"tenantName": "demo",
"passwordCredentials": {
"username": "demo",
"password": "secretsecret"
}
}
}
URL应为:
请参阅:
获得令牌后,您可以访问OpenStack提供的所有资源。您将此负载发送到哪个URL?