首页 > 其他分享 >OpenStack 命令行创建 Unified limit

OpenStack 命令行创建 Unified limit

时间:2023-01-30 21:35:25浏览次数:69  
标签:Unified limits registered detail v3 limit https OpenStack ref

Create registered limit using cURL

1. Get token

ref to https://docs.openstack.org/api-ref/identity/v3/index.html?expanded=create-registered-limits-detail,list-services-detail,password-authentication-with-scoped-authorization-detail#password-authentication-with-scoped-authorization 参考 System-Scoped Example

export OS_TOKEN=`curl -i --cacert "/etc/kolla/certificates/ca/ca_int.crt" \
-X POST https://[fd01::100:0:0:1]:35357/v3/auth/tokens?nocatalog \
-H "Content-Type: application/json" \
-d '{"auth":{"identity":{"methods":["password"],"password":{"user":{"id":"169axxxe879a4309b340d496a0fd7f66","password":"<to-be-field>"}}},"scope": {"system": {"all": true}}}}' \
| grep -i x-subject-token | cut -d ":" -f 2`

2. 获取 glance service id

ref to https://docs.openstack.org/api-ref/identity/v3/index.html?expanded=create-registered-limits-detail,list-services-detail#list-services

curl -g -i --cacert "/etc/kolla/certificates/ca/ca_int.crt" \
-X GET https://[fd01::100:0:0:1]:35357/v3/services \
-H "Accept: application/json" -H "Content-Type: application/json" \
-H "X-Auth-Token: $OS_TOKEN" \
-d '{"name": "glance", "type": "image"}' | python -m json.tool | grep glance -A 2

3. Create registered limit

ref to https://docs.openstack.org/api-ref/identity/v3/index.html?expanded=create-registered-limits-detail,list-services-detail#create-registered-limits

curl -g -i --cacert "/etc/kolla/certificates/ca/ca_int.crt" \
-X POST https://[fd01::100:0:0:1]:35357/v3/registered_limits \
-H "Accept: application/json" -H "Content-Type: application/json" \
-H "X-Auth-Token: $OS_TOKEN" \
-d '{"registered_limits": [{"service_id": "<to-be-field>", "resource_name": "image_count_total", "default_limit": 111, "region_id": "CEERegion"}]}'

4. 删除和修改 registered limit

和第三步类似,参考 https://docs.openstack.org/api-ref/identity/v3/index.html 里面的:

  • /v3/registered_limits
  • /v3/limits

标签:Unified,limits,registered,detail,v3,limit,https,OpenStack,ref
From: https://www.cnblogs.com/jneeee/p/create_unified_limit_with_CLI.html

相关文章

  • IDEA加载大文件时报错:The file size exceeds configured limit
    1,问题描述1Thefilesizeexceedsconfiguredlimit2,解决方案:配置一下idea.properties文件3,添加如下配置1idea.max.intellisense.filesize=500004,重启idea,完......
  • 使用prometheus来避免Kubernetes CPU Limits造成的事故
    使用prometheus来避免KubernetesCPULimits造成的事故译自:UsingPrometheustoAvoidDisasterswithKubernetesCPULimits本文将介绍Kubernetes的resourcelimits是......
  • openstacksdk快速上手
    hello,大家好,这里是费冰,今天是大年初六,唉,这么早就被迫营业了。那么今天来解读一波openstacksdk。Openstacksdk是什么其实我很难说明一个是什么的问题。如果你使用过pytho......
  • OpenStack云平台搭建
    参考:https://blog.csdn.net/m0_45692110/article/details/122628664https://huaweicloud.csdn.net/635607c3d3efff3090b58eb4.html一、虚拟机准备controller和compute虚拟......
  • Openstack Horizon and Django Compare the Working of authentication (Login)
    ​​http://fosshelp.blogspot.com/2014/01/openstack-horizon-and-django-compare.html​​copy:Workingofauthentication(Login)indjango===========================......
  • Openstack-创建实例错误
    创建实例错误实例执行所请求操作失败,实例处于错误状态。:请稍后再试[错误:Buildofinstancebeaeb5e0-26eb-4044-ae14-bb87d509886daborted:Failedtoallocateth......
  • Openstack-删除卷:您被禁止执行 删除卷 (僵尸卷)
    您被禁止执行删除卷(僵尸卷)您被禁止执行删除卷:7f23a26a-27f2-4504-9191-0f5630a5bff5,卷一直在创建,但实例已经被删除了[root@controller~]#mysql-uroot-p000......
  • Openstack-dashboard默认配额
    创建实例不超过10个方法一修改配置文件在使用openstack的过程中,默认创建的实例最多10个,这是因为配额默认实例就是10所以我们需要修改配置文件/etc/nova/nova.conf中......
  • OpenStack命令行参考
    OpenStack命令行参考hello,大家好,这里是费冰。在使用OpenStack的过程中,固然我们可以通过web页面完成绝大多数的操作,但作为管理人员,不能不知晓OpenStack命令行的有关知......
  • OpenStack命令行参考
    OpenStack命令行参考hello,大家好,这里是费冰。在使用OpenStack的过程中,固然我们可以通过web页面完成绝大多数的操作,但作为管理人员,不能不知晓OpenStack命令行的有关知识......