gophercloud: github.com/rackspace/gophercloud/openstack/compute/v2/extensions/defsecrules Index | Files

package defsecrules

import "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/defsecrules"

Index

Package Files

doc.go requests.go results.go urls.go

func Delete Uses

func Delete(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult

Delete will permanently delete a default rule from the project.

func ExtractDefaultRules Uses

func ExtractDefaultRules(page pagination.Page) ([]DefaultRule, error)

ExtractDefaultRules returns a slice of DefaultRules contained in a single page of results.

func List Uses

func List(client *gophercloud.ServiceClient) pagination.Pager

List will return a collection of default rules.

type CreateOpts Uses

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 Uses

func (opts CreateOpts) ToRuleCreateMap() (map[string]interface{}, error)

ToRuleCreateMap builds the create rule options into a serializable format.

type CreateOptsBuilder Uses

type CreateOptsBuilder interface {
    ToRuleCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder builds the create rule options into a serializable format.

type CreateResult Uses

type CreateResult struct {
    // contains filtered or unexported fields
}

CreateResult represents the result of a create operation.

func Create Uses

func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult

Create is the operation responsible for creating a new default rule.

func (CreateResult) Extract Uses

func (r CreateResult) Extract() (*DefaultRule, error)

Extract will extract a DefaultRule struct from most responses.

type DefaultRule Uses

type DefaultRule secgroups.Rule

DefaultRule represents a default rule - which is identical to a normal security rule.

type DefaultRulePage Uses

type DefaultRulePage struct {
    pagination.SinglePageBase
}

DefaultRulePage is a single page of a DefaultRule collection.

func (DefaultRulePage) IsEmpty Uses

func (page DefaultRulePage) IsEmpty() (bool, error)

IsEmpty determines whether or not a page of default rules contains any results.

type GetResult Uses

type GetResult struct {
    // contains filtered or unexported fields
}

GetResult represents the result of a get operation.

func Get Uses

func Get(client *gophercloud.ServiceClient, id string) GetResult

Get will return details for a particular default rule.

func (GetResult) Extract Uses

func (r GetResult) Extract() (*DefaultRule, error)

Extract will extract a DefaultRule struct from most responses.

Package defsecrules imports 6 packages (graph). Updated 2016-07-23. Refresh now. Tools for package owners.