Documentation ¶
Index ¶
- func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type AddSecurityServiceOpts
- type AddSecurityServiceOptsBuilder
- type AddSecurityServiceResult
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type RemoveSecurityServiceOpts
- type RemoveSecurityServiceOptsBuilder
- type RemoveSecurityServiceResult
- type ShareNetwork
- type ShareNetworkPage
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListDetail ¶
func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
ListDetail returns ShareNetworks optionally limited by the conditions provided in ListOpts.
Types ¶
type AddSecurityServiceOpts ¶
type AddSecurityServiceOpts struct {
SecurityServiceID string `json:"security_service_id"`
}
AddSecurityServiceOpts contain options for adding a security service to an existing ShareNetwork. This object is passed to the sharenetworks.AddSecurityService function. For more information about the parameters, see the ShareNetwork object.
func (AddSecurityServiceOpts) ToShareNetworkAddSecurityServiceMap ¶
func (opts AddSecurityServiceOpts) ToShareNetworkAddSecurityServiceMap() (map[string]interface{}, error)
ToShareNetworkAddSecurityServiceMap assembles a request body based on the contents of an AddSecurityServiceOpts.
type AddSecurityServiceOptsBuilder ¶
type AddSecurityServiceOptsBuilder interface {
}AddSecurityServiceOptsBuilder allows extensions to add additional parameters to the AddSecurityService request.
type AddSecurityServiceResult ¶
type AddSecurityServiceResult struct {
// contains filtered or unexported fields
}
AddSecurityServiceResult contains the response body and error from a security service addition request.
func (AddSecurityServiceResult) Extract ¶
func (r AddSecurityServiceResult) Extract() (*ShareNetwork, error)
Extract will get the ShareNetwork object out of the commonResult object.
type CreateOpts ¶
type CreateOpts struct { // The UUID of the Neutron network to set up for share servers NeutronNetID string `json:"neutron_net_id,omitempty"` // The UUID of the Neutron subnet to set up for share servers NeutronSubnetID string `json:"neutron_subnet_id,omitempty"` // The UUID of the nova network to set up for share servers NovaNetID string `json:"nova_net_id,omitempty"` // The share network name Name string `json:"name"` // The share network description Description string `json:"description"` }
CreateOpts contains options for creating a ShareNetwork. This object is passed to the sharenetworks.Create function. For more information about these parameters, see the ShareNetwork object.
func (CreateOpts) ToShareNetworkCreateMap ¶
func (opts CreateOpts) ToShareNetworkCreateMap() (map[string]interface{}, error)
ToShareNetworkCreateMap assembles a request body based on the contents of a CreateOpts.
type CreateOptsBuilder ¶
type CreateOptsBuilder interface {
}CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult contains the response body and error from a Create request.
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create will create a new ShareNetwork based on the values in CreateOpts. To extract the ShareNetwork object from the response, call the Extract method on the CreateResult.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*ShareNetwork, error)
Extract will get the ShareNetwork object out of the commonResult object.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult contains the response body and error from a Delete request.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult)
Delete will delete the existing ShareNetwork with the provided ID.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult contains the response body and error from a Get request.
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) (r GetResult)
Get retrieves the ShareNetwork with the provided ID. To extract the ShareNetwork object from the response, call the Extract method on the GetResult.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*ShareNetwork, error)
Extract will get the ShareNetwork object out of the commonResult object.
type ListOpts ¶
type ListOpts struct { // admin-only option. Set it to true to see all tenant share networks. AllTenants bool `q:"all_tenants"` // The UUID of the project where the share network was created ProjectID string `q:"project_id"` // The neutron network ID NeutronNetID string `q:"neutron_net_id"` // The neutron subnet ID NeutronSubnetID string `q:"neutron_subnet_id"` // The nova network ID NovaNetID string `q:"nova_net_id"` // The network type. A valid value is VLAN, VXLAN, GRE or flat NetworkType string `q:"network_type"` // The Share Network name Name string `q:"name"` // The Share Network description Description string `q:"description"` // The Share Network IP version IPVersion gophercloud.IPVersion `q:"ip_version"` // The Share Network segmentation ID SegmentationID int `q:"segmentation_id"` // List all share networks created after the given date CreatedSince string `q:"created_since"` // List all share networks created before the given date CreatedBefore string `q:"created_before"` // Limit specifies the page size. Limit int `q:"limit"` // Limit specifies the page number. Offset int `q:"offset"` }
ListOpts holds options for listing ShareNetworks. It is passed to the sharenetworks.List function.
func (ListOpts) ToShareNetworkListQuery ¶
ToShareNetworkListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
type ListOptsBuilder interface {
}ListOptsBuilder allows extensions to add additional parameters to the List request.
type RemoveSecurityServiceOpts ¶
type RemoveSecurityServiceOpts struct {
SecurityServiceID string `json:"security_service_id"`
}
RemoveSecurityServiceOpts contain options for removing a security service from an existing ShareNetwork. This object is passed to the sharenetworks.RemoveSecurityService function. For more information about the parameters, see the ShareNetwork object.
func (RemoveSecurityServiceOpts) ToShareNetworkRemoveSecurityServiceMap ¶
func (opts RemoveSecurityServiceOpts) ToShareNetworkRemoveSecurityServiceMap() (map[string]interface{}, error)
ToShareNetworkRemoveSecurityServiceMap assembles a request body based on the contents of an RemoveSecurityServiceOpts.
type RemoveSecurityServiceOptsBuilder ¶
type RemoveSecurityServiceOptsBuilder interface {
}RemoveSecurityServiceOptsBuilder allows extensions to add additional parameters to the RemoveSecurityService request.
type RemoveSecurityServiceResult ¶
type RemoveSecurityServiceResult struct {
// contains filtered or unexported fields
}
RemoveSecurityServiceResult contains the response body and error from a security service removal request.
func (RemoveSecurityServiceResult) Extract ¶
func (r RemoveSecurityServiceResult) Extract() (*ShareNetwork, error)
Extract will get the ShareNetwork object out of the commonResult object.
type ShareNetwork ¶
type ShareNetwork struct { string `json:"id"` ProjectID string `json:"project_id"` NeutronNetID string `json:"neutron_net_id"` NeutronSubnetID string `json:"neutron_subnet_id"` NovaNetID string `json:"nova_net_id"` NetworkType string `json:"network_type"` SegmentationID int `json:"segmentation_id"` CIDR string `json:"cidr"` IPVersion int `json:"ip_version"` Name string `json:"name"` Description string `json:"description"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` }ID
ShareNetwork contains all the information associated with an OpenStack ShareNetwork.
func ExtractShareNetworks ¶
func ExtractShareNetworks(r pagination.Page) ([]ShareNetwork, error)
ExtractShareNetworks extracts and returns ShareNetworks. It is used while iterating over a sharenetworks.List call.
func (*ShareNetwork) UnmarshalJSON ¶
func (r *ShareNetwork) UnmarshalJSON(b []byte) error
type ShareNetworkPage ¶
type ShareNetworkPage struct {
}ShareNetworkPage is a pagination.pager that is returned from a call to the List function.
func (ShareNetworkPage) IsEmpty ¶
func (r ShareNetworkPage) IsEmpty() (bool, error)
IsEmpty satisifies the IsEmpty method of the Page interface
func (ShareNetworkPage) LastMarker ¶
func (r ShareNetworkPage) LastMarker() (string, error)
LastMarker returns the last offset in a ListResult.
func (ShareNetworkPage) NextPageURL ¶
func (r ShareNetworkPage) NextPageURL() (string, error)
NextPageURL generates the URL for the page of results after this one.
type UpdateOpts ¶
type UpdateOpts struct { // The share network name Name string `json:"name,omitempty"` // The share network description Description string `json:"description,omitempty"` // The UUID of the Neutron network to set up for share servers NeutronNetID string `json:"neutron_net_id,omitempty"` // The UUID of the Neutron subnet to set up for share servers NeutronSubnetID string `json:"neutron_subnet_id,omitempty"` // The UUID of the nova network to set up for share servers NovaNetID string `json:"nova_net_id,omitempty"` }
UpdateOpts contain options for updating an existing ShareNetwork. This object is passed to the sharenetworks.Update function. For more information about the parameters, see the ShareNetwork object.
func (UpdateOpts) ToShareNetworkUpdateMap ¶
func (opts UpdateOpts) ToShareNetworkUpdateMap() (map[string]interface{}, error)
ToShareNetworkUpdateMap assembles a request body based on the contents of an UpdateOpts.
type UpdateOptsBuilder ¶
type UpdateOptsBuilder interface {
}UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult contains the response body and error from an Update request.
func AddSecurityService ¶
func AddSecurityService(client *gophercloud.ServiceClient, id string, opts AddSecurityServiceOptsBuilder) (r UpdateResult)
AddSecurityService will add the security service to a ShareNetwork. To extract the updated ShareNetwork from the response, call the Extract method on the UpdateResult.
func RemoveSecurityService ¶
func RemoveSecurityService(client *gophercloud.ServiceClient, id string, opts RemoveSecurityServiceOptsBuilder) (r UpdateResult)
RemoveSecurityService will remove the security service from a ShareNetwork. To extract the updated ShareNetwork from the response, call the Extract method on the UpdateResult.
func Update ¶
func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update will update the ShareNetwork with provided information. To extract the updated ShareNetwork from the response, call the Extract method on the UpdateResult.
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*ShareNetwork, error)
Extract will get the ShareNetwork object out of the commonResult object.