github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/compute/v2/extensions/quotasets/doc.go (about)

     1  /*
     2  Package quotasets enables retrieving and managing Compute quotas.
     3  
     4  Example to Get a Quota Set
     5  
     6  	quotaset, err := quotasets.Get(computeClient, "tenant-id").Extract()
     7  	if err != nil {
     8  		panic(err)
     9  	}
    10  
    11  	fmt.Printf("%+v\n", quotaset)
    12  
    13  Example to Get a Detailed Quota Set
    14  
    15  	quotaset, err := quotasets.GetDetail(computeClient, "tenant-id").Extract()
    16  	if err != nil {
    17  		panic(err)
    18  	}
    19  
    20  	fmt.Printf("%+v\n", quotaset)
    21  
    22  Example to Update a Quota Set
    23  
    24  	updateOpts := quotasets.UpdateOpts{
    25  		FixedIPs: golangsdk.IntToPointer(100),
    26  		Cores:    golangsdk.IntToPointer(64),
    27  	}
    28  
    29  	quotaset, err := quotasets.Update(computeClient, "tenant-id", updateOpts).Extract()
    30  	if err != nil {
    31  		panic(err)
    32  	}
    33  
    34  	fmt.Printf("%+v\n", quotaset)
    35  */
    36  package quotasets