Documentation ¶
Index ¶
- func DeleteURL(c *golangsdk.ServiceClient, portId string) string
- func GetURL(c *golangsdk.ServiceClient, portId string) string
- func UpdateURL(c *golangsdk.ServiceClient, portId string) string
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type FixIPEntity
- type GetResult
- type ListOpts
- type ListPortsOptsBuilder
- type ListResult
- type Ports
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Specifies the ID of the network to which the port belongs. The // network ID must be a real one in the network environment. NetworkId string `json:"network_id" required:"true"` DeviceOwner string `json:"device_owner,omitempty"` FixedIPs []FixIPEntity `json:"fixed_ips,omitempty"` }
func (CreateOpts) ToPortsCreateMap ¶
func (opts CreateOpts) ToPortsCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, portId string) (r DeleteResult)
type FixIPEntity ¶
type FixIPEntity struct { SubnetID string `json:"subnet_id,omitempty"` IPAddress string `json:"ip_address,omitempty"` }
FixIPEntity 私有IP的结构体
type ListOpts ¶
type ListOpts struct { Limit int `q:"limit"` Offset int `q:"offset"` ID string `q:"id"` Name string `q:"name"` AdminStateUp bool `q:"admin_state_up"` DeviceID string `q:"device_id"` DeviceOwner string `q:"device_owner"` FixedIPs []string `q:"fixed_ips"` MacAddress string `q:"mac_address"` NetworkID string `q:"network_id"` SecurityGroups string `q:"security_groups"` Status string `q:"status"` }
func (ListOpts) ToListPortsQuery ¶
type ListPortsOptsBuilder ¶
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListPortsOptsBuilder) (r ListResult)
func (ListResult) Extract ¶
func (r ListResult) Extract() (*Ports, error)
type UpdateOpts ¶
type UpdateOpts struct { // Specifies the port name. The value can contain no more than 255 // characters. This parameter is left blank by default. Name string `json:"name,omitempty"` // Specifies the UUID of the security group. // This attribute is extended. SecurityGroups *[]string `json:"security_groups,omitempty"` // 1. Specifies a set of zero or more allowed address pairs. An // address pair consists of an IP address and MAC address. This attribute is extended. // For details, see parameter?allow_address_pair. 2. The IP address cannot be?0.0.0.0. // 3. Configure an independent security group for the port if a large CIDR block (subnet // mask less than 24) is configured for parameter?allowed_address_pairs. AllowedAddressPairs *[]common.AllowedAddressPair `json:"allowed_address_pairs,omitempty"` // Specifies a set of zero or more extra DHCP option pairs. An // option pair consists of an option value and name. This attribute is extended. ExtraDhcpOpts []common.ExtraDHCPOpt `json:"extra_dhcp_opts,omitempty"` }
func (UpdateOpts) ToPortsUpdateMap ¶
func (opts UpdateOpts) ToPortsUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(client *golangsdk.ServiceClient, portId string, opts UpdateOptsBuilder) (r UpdateResult)
Click to show internal directories.
Click to hide internal directories.