sharenetworks

package
v1.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 {
	ToShareNetworkAddSecurityServiceMap() (map[string]interface{}, error)
}

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 {
	ToShareNetworkCreateMap() (map[string]interface{}, error)
}

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

func (opts ListOpts) ToShareNetworkListQuery() (string, error)

ToShareNetworkListQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToShareNetworkListQuery() (string, error)
}

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 {
	ToShareNetworkRemoveSecurityServiceMap() (map[string]interface{}, error)
}

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 {
	// The Share Network ID
	ID string `json:"id"`
	// The UUID of the project where the share network was created
	ProjectID string `json:"project_id"`
	// The neutron network ID
	NeutronNetID string `json:"neutron_net_id"`
	// The neutron subnet ID
	NeutronSubnetID string `json:"neutron_subnet_id"`
	// The nova network ID
	NovaNetID string `json:"nova_net_id"`
	// The network type. A valid value is VLAN, VXLAN, GRE or flat
	NetworkType string `json:"network_type"`
	// The segmentation ID
	SegmentationID int `json:"segmentation_id"`
	// The IP block from which to allocate the network, in CIDR notation
	CIDR string `json:"cidr"`
	// The IP version of the network. A valid value is 4 or 6
	IPVersion int `json:"ip_version"`
	// The Share Network name
	Name string `json:"name"`
	// The Share Network description
	Description string `json:"description"`
	// The date and time stamp when the Share Network was created
	CreatedAt time.Time `json:"-"`
	// The date and time stamp when the Share Network was updated
	UpdatedAt time.Time `json:"-"`
}

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 {
	pagination.MarkerPageBase
}

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 {
	ToShareNetworkUpdateMap() (map[string]interface{}, error)
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL