defsecrules

package
v0.2.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2015 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

Delete will permanently delete a default rule from the project.

func List

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

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

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

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

type DefaultRule secgroups.Rule

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.

Jump to

Keyboard shortcuts

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