Documentation ¶
Index ¶
- func AddNics(client *gophercloud.ServiceClient, seviceId string, opts AddOptsBuilder) (jobId string, err error)
- func DeleteNics(client *gophercloud.ServiceClient, seviceId string, opts DelOptsBuilder) (jobId string, err error)
- type AddOpts
- type AddOptsBuilder
- type AddResult
- type BindOpts
- type BindOptsBuilder
- type BindResult
- type DelOpts
- type DelOptsBuilder
- type DelResult
- type Job
- type Nic
- type Nics
- type Port
- type SecurityGroup
- type UnBindOpts
- type UnBindOptsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNics ¶
func AddNics(client *gophercloud.ServiceClient, seviceId string, opts AddOptsBuilder) (jobId string, err error)
Adding nics to an ecs in batches based on the configuration defined in the AddOpts struct.
func DeleteNics ¶
func DeleteNics(client *gophercloud.ServiceClient, seviceId string, opts DelOptsBuilder) (jobId string, err error)
Deleting nics from an ecs in batches based on the configuration defined in the DelOpts struct.
Types ¶
type AddOpts ¶
type AddOpts struct {
Nics []Nic `json:"nics"`
}
AddOpts represents options for add nics.
func (AddOpts) ToAddNicsOptsMap ¶
ToAddNicsOptsMap builds a request body from AddOpts.
type AddOptsBuilder ¶
AddOptsBuilder allows extensions to add additional parameters to the AddNics request.
type AddResult ¶
type AddResult struct {
// contains filtered or unexported fields
}
AddResult represents the result of a add operation. Call its ExtractJob method to get the JobId.
func (AddResult) ExtractJob ¶
ExtractJob is a function that accepts a result get the JobId
type BindOpts ¶
type BindOpts struct { // Specifies the subnet ID of the NIC. SubnetId string `json:"subnet_id" required:"true"` // Specifies the virtual IP address to be bound to a NIC. IpAddress string `json:"ip_address" required:"true"` // Indicates the allowed_address_pairs attribute of a virtual IP address, // specifying whether the NIC IP/MAC address pair is added. ReverseBinding *bool `json:"reverse_binding" required:"true"` // Specifies the DHCP, router, LB, or Nova to which a device belongs. DeviceOwner string `json:"device_owner,omitempty"` }
BindOpts represents options for binding a virtual ip address to an ecs nic.
func (BindOpts) ToBindOptsMap ¶
ToBindOptsMap builds a request body from BindOpts.
type BindOptsBuilder ¶
BindOptsBuilder allows extensions to add additional parameters to the BindOpts request.
type BindResult ¶
type BindResult struct {
// contains filtered or unexported fields
}
BindResult represents the result of bind operation and unbind operation. Call its ExtractPortId method to get the portId.
func BindNic ¶
func BindNic(c *gophercloud.ServiceClient, nicId string, opts BindOptsBuilder) (r BindResult)
Binding a virtual ip address to an ecs nic based on the configuration defined in the BindOpts struct.
func UnBindNic ¶
func UnBindNic(c *gophercloud.ServiceClient, nicId string, opts UnBindOptsBuilder) (r BindResult)
Unbinding a virtual ip address to an ecs nic based on the configuration defined in the UnBindOpts struct.
func (BindResult) ExtractJob ¶
ExtractJob is a function that accepts a result get the JobId
func (BindResult) ExtractPortId ¶
func (r BindResult) ExtractPortId() (string, error)
ExtractPortId is a function that accepts a result get the PortId
type DelOpts ¶
type DelOpts struct {
Nics []Nics `json:"nics"`
}
AddOpts represents options for delete nics.
func (DelOpts) ToDelNicsOptsMap ¶
ToDelNicsOptsMap builds a request body from DelOpts.
type DelOptsBuilder ¶
DelOptsBuilder allows extensions to add additional parameters to the DeleteNics request.
type DelResult ¶
type DelResult struct {
// contains filtered or unexported fields
}
DelResult represents the result of a delete operation. Call its ExtractJob method to get the JobId.
func (DelResult) ExtractJob ¶
ExtractJob is a function that accepts a result get the JobId
type Nic ¶
type Nic struct { // Specifies the subnet ID of the NIC to be added. SubnetId string `json:"subnet_id" required:"true"` // Specifies the IP address. // If this parameter is unavailable, the IP address is automatically assigned. IpAddress string `json:"ip_address,omitempty"` // Specifies the security groups for NICs. SecurityGroups []SecurityGroup `json:"security_groups"` }
type SecurityGroup ¶
type SecurityGroup struct { //Specifies the ID of the security group. ID string `json:"id" required:"true"` }
type UnBindOpts ¶
type UnBindOpts struct { // Specifies the subnet ID of the NIC. // This parameter must be left blank when you unbind the virtual IP address from an ECS NIC. SubnetId string `json:"subnet_id"` // Specifies the virtual IP address to be unbound from a NIC. // This parameter must be left blank when you unbind the virtual IP address from an ECS NIC. IpAddress string `json:"ip_address"` // Indicates the allowed_address_pairs attribute of a virtual IP address, // specifying whether the NIC IP/MAC address pair is added. ReverseBinding *bool `json:"reverse_binding,omitempty"` }
UnBindOpts represents options for unbinding a virtual ip address to an ecs nic.
func (UnBindOpts) ToUnBindOptsMap ¶
func (opts UnBindOpts) ToUnBindOptsMap() (map[string]interface{}, error)
ToUnBindOptsMap builds a request body from UnBindOpts.
type UnBindOptsBuilder ¶
UnBindOptsBuilder allows extensions to add additional parameters to the UnBindOpts request.