Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult
Delete will permanently delete a default rule from the project.
func List ¶
func List(client *gophercloud.ServiceClient) pagination.Pager
List will return a collection of default rules.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Required - the lower bound of the port range that will be opened. FromPort int `json:"from_port"` // Required - the upper bound of the port range that will be opened. ToPort int `json:"to_port"` // Required - the protocol type that will be allowed, e.g. TCP. IPProtocol string `json:"ip_protocol"` // ONLY required if FromGroupID is blank. This represents the IP range that // will be the source of network traffic to your security group. Use // 0.0.0.0/0 to allow all IP addresses. CIDR string `json:"cidr,omitempty"` }
CreateOpts represents the configuration for adding a new default rule.
func (CreateOpts) ToRuleCreateMap ¶
func (opts CreateOpts) ToRuleCreateMap() (map[string]interface{}, error)
ToRuleCreateMap builds the create rule options into a serializable format.
type CreateOptsBuilder ¶
CreateOptsBuilder builds the create rule options into a serializable format.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation.
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult
Create is the operation responsible for creating a new default rule.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*DefaultRule, error)
Extract will extract a DefaultRule struct from most responses.
type DefaultRule ¶
DefaultRule represents a default rule - which is identical to a normal security rule.
func ExtractDefaultRules ¶
func ExtractDefaultRules(page pagination.Page) ([]DefaultRule, error)
ExtractDefaultRules returns a slice of DefaultRules contained in a single page of results.
type DefaultRulePage ¶
type DefaultRulePage struct {
pagination.SinglePageBase
}
DefaultRulePage is a single page of a DefaultRule collection.
func (DefaultRulePage) IsEmpty ¶
func (page DefaultRulePage) IsEmpty() (bool, error)
IsEmpty determines whether or not a page of default rules contains any results.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation.
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) GetResult
Get will return details for a particular default rule.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*DefaultRule, error)
Extract will extract a DefaultRule struct from most responses.