neutronmodel

package
v3.0.0-...-1c69814 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NeutronModel

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

func New

func New() *NeutronModel

New setups the default data Network and Security Group for the neutron and nova test services.

func (*NeutronModel) AddFloatingIP

func (n *NeutronModel) AddFloatingIP(ip neutron.FloatingIPV2) error

AddFloatingIP creates a new floating IP address in the pool, given a neutron.FloatingIPV2.

func (*NeutronModel) AddNetwork

func (n *NeutronModel) AddNetwork(network neutron.NetworkV2) error

AddNetwork creates a new network.

func (*NeutronModel) AddNovaFloatingIP

func (n *NeutronModel) AddNovaFloatingIP(ip nova.FloatingIP) error

AddNovaFloatingIP creates a new floatingIP IP address in the pool, given a nova.FloatingIP.

func (*NeutronModel) AddNovaSecurityGroup

func (n *NeutronModel) AddNovaSecurityGroup(group nova.SecurityGroup) error

AddNovaSecurityGroup creates a new security group given a nova.SecurityGroup.

func (*NeutronModel) AddNovaSecurityGroupRule

func (n *NeutronModel) AddNovaSecurityGroupRule(ruleId string, rule nova.RuleInfo) error

AddSecurityGroupRule creates a new rule in an existing group, data in nova.RuleInfo form. Rule is assumed to be ingress.

func (*NeutronModel) AddSecurityGroup

func (n *NeutronModel) AddSecurityGroup(group neutron.SecurityGroupV2) error

AddSecurityGroup creates a new security group given a neutron.SecurityGroupV2.

func (*NeutronModel) AddSecurityGroupRule

func (n *NeutronModel) AddSecurityGroupRule(ruleId string, rule neutron.RuleInfoV2) error

AddSecurityGroupRule creates a new rule in an existing group. This can be either an ingress or an egress rule (see the notes about neutron.RuleInfoV2).

func (*NeutronModel) AllFloatingIPs

func (n *NeutronModel) AllFloatingIPs() []neutron.FloatingIPV2

AllFloatingIPs returns a list of all created floating IPs, data in neutron.FloatingIPV2 form.

func (*NeutronModel) AllNetworks

func (n *NeutronModel) AllNetworks() (networks []neutron.NetworkV2)

AllNetworks returns a list of all existing networks in neutron.NetworkV2.

func (*NeutronModel) AllNovaFloatingIPs

func (n *NeutronModel) AllNovaFloatingIPs() []nova.FloatingIP

AllNovaFloatingIPs returns a list of all created floating IPs, data in nova.FloatingIP form.

func (*NeutronModel) AllNovaNetworks

func (n *NeutronModel) AllNovaNetworks() (networks []nova.Network)

AllNovaNetworks returns of list of all existing networks in nova.Network form.

func (*NeutronModel) AllNovaSecurityGroups

func (n *NeutronModel) AllNovaSecurityGroups() []nova.SecurityGroup

AllNovaSecurityGroups returns a list of all existing groups, nova.SecurityGroup form.

func (*NeutronModel) AllSecurityGroups

func (n *NeutronModel) AllSecurityGroups() []neutron.SecurityGroupV2

AllSecurityGroups returns a list of all existing groups, data in neutron.SecurityGroupV2 form.

func (*NeutronModel) FloatingIP

func (n *NeutronModel) FloatingIP(ipId string) (*neutron.FloatingIPV2, error)

FloatingIP retrieves a neutron floating IP by ID.

func (*NeutronModel) FloatingIPByAddr

func (n *NeutronModel) FloatingIPByAddr(address string) (*neutron.FloatingIPV2, error)

FloatingIPByAddr retrieves a neutron floating IP by address.

func (*NeutronModel) HasFloatingIP

func (n *NeutronModel) HasFloatingIP(address string) bool

HasFloatingIP returns whether the given floating IP address exists.

func (*NeutronModel) HasSecurityGroupRule

func (n *NeutronModel) HasSecurityGroupRule(groupId, ruleId string) bool

HasSecurityGroupRule returns whether the given group contains the given rule, or (when groupId="-1") whether the given rule exists.

func (*NeutronModel) Network

func (n *NeutronModel) Network(networkId string) (*neutron.NetworkV2, error)

Network retrieves the network in Neutron Network form by ID.

func (*NeutronModel) NovaFloatingIP

func (n *NeutronModel) NovaFloatingIP(ipId string) (*nova.FloatingIP, error)

NovaFloatingIP retrieves a nova floating IP by ID.

func (*NeutronModel) NovaFloatingIPByAddr

func (n *NeutronModel) NovaFloatingIPByAddr(address string) (*nova.FloatingIP, error)

NovaFloatingIPByAddr retrieves a nova floating IP by address.

func (*NeutronModel) NovaNetwork

func (n *NeutronModel) NovaNetwork(networkId string) (*nova.Network, error)

NovaNetwork retrieves the network in Nova Network form by ID.

func (*NeutronModel) NovaSecurityGroup

func (n *NeutronModel) NovaSecurityGroup(groupId string) (*nova.SecurityGroup, error)

NovaSecurityGroup retrieves an existing group by ID, data in nova.SecurityGroup form.

func (*NeutronModel) NovaSecurityGroupByName

func (n *NeutronModel) NovaSecurityGroupByName(groupName string) (*nova.SecurityGroup, error)

NovaSecurityGroupByName retrieves an existing named group, data in nova.SecurityGroup form.

func (*NeutronModel) NovaSecurityGroupRule

func (n *NeutronModel) NovaSecurityGroupRule(ruleId string) (*nova.SecurityGroupRule, error)

SecurityGroupRule retrieves an existing rule by ID, data in nova.SecurityGroupRule form.

func (*NeutronModel) RemoveFloatingIP

func (n *NeutronModel) RemoveFloatingIP(ipId string) error

RemoveFloatingIP deletes an existing floating IP by ID.

func (*NeutronModel) RemoveNetwork

func (n *NeutronModel) RemoveNetwork(netId string) error

RemoveNetwork deletes an existing group.

func (*NeutronModel) RemoveSecurityGroup

func (n *NeutronModel) RemoveSecurityGroup(groupId string) error

RemoveSecurityGroup deletes an existing group.

func (*NeutronModel) RemoveSecurityGroupRule

func (n *NeutronModel) RemoveSecurityGroupRule(ruleId string) error

RemoveSecurityGroupRule deletes an existing rule from its group.

func (*NeutronModel) SecurityGroup

func (n *NeutronModel) SecurityGroup(groupId string) (*neutron.SecurityGroupV2, error)

SecurityGroup retrieves an existing group by ID, data in neutron.SecurityGroupV2 form.

func (*NeutronModel) SecurityGroupByName

func (n *NeutronModel) SecurityGroupByName(groupName string) ([]neutron.SecurityGroupV2, error)

SecurityGroupByName retrieves an existing named group, data in neutron.SecurityGroupV2 form.

func (*NeutronModel) SecurityGroupRule

func (n *NeutronModel) SecurityGroupRule(ruleId string) (*neutron.SecurityGroupRuleV2, error)

SecurityGroupRule retrieves an existing rule by ID, data in neutron.SecurityGroupRuleV2 form.

func (*NeutronModel) UpdateNovaFloatingIP

func (n *NeutronModel) UpdateNovaFloatingIP(fip *nova.FloatingIP) error

UpdateNovaFloatingIP updates the Fixed IP, given a nova.FloatingIP.

func (*NeutronModel) UpdateNovaSecurityGroup

func (n *NeutronModel) UpdateNovaSecurityGroup(group nova.SecurityGroup) error

UpdateNovaSecurityGroup updates an existing security group given a nova.SecurityGroup.

func (*NeutronModel) UpdateSecurityGroup

func (n *NeutronModel) UpdateSecurityGroup(group neutron.SecurityGroupV2) error

UpdateSecurityGroup updates an existing security group given a neutron.SecurityGroupRuleV2.

Jump to

Keyboard shortcuts

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