Documentation ¶
Index ¶
- type NeutronModel
- func (n *NeutronModel) AddFloatingIP(ip neutron.FloatingIPV2) error
- func (n *NeutronModel) AddNetwork(network neutron.NetworkV2) error
- func (n *NeutronModel) AddNovaFloatingIP(ip nova.FloatingIP) error
- func (n *NeutronModel) AddNovaSecurityGroup(group nova.SecurityGroup) error
- func (n *NeutronModel) AddNovaSecurityGroupRule(ruleId string, rule nova.RuleInfo) error
- func (n *NeutronModel) AddPort(port neutron.PortV2) error
- func (n *NeutronModel) AddSecurityGroup(group neutron.SecurityGroupV2) error
- func (n *NeutronModel) AddSecurityGroupRule(ruleId string, rule neutron.RuleInfoV2) error
- func (n *NeutronModel) AllFloatingIPs() []neutron.FloatingIPV2
- func (n *NeutronModel) AllNetworks() (networks []neutron.NetworkV2)
- func (n *NeutronModel) AllNovaFloatingIPs() []nova.FloatingIP
- func (n *NeutronModel) AllNovaNetworks() (networks []nova.Network)
- func (n *NeutronModel) AllNovaSecurityGroups() []nova.SecurityGroup
- func (n *NeutronModel) AllPorts() []neutron.PortV2
- func (n *NeutronModel) AllSecurityGroups() []neutron.SecurityGroupV2
- func (n *NeutronModel) FloatingIP(ipId string) (*neutron.FloatingIPV2, error)
- func (n *NeutronModel) FloatingIPByAddr(address string) (*neutron.FloatingIPV2, error)
- func (n *NeutronModel) HasFloatingIP(address string) bool
- func (n *NeutronModel) HasSecurityGroupRule(groupId, ruleId string) bool
- func (n *NeutronModel) Network(networkId string) (*neutron.NetworkV2, error)
- func (n *NeutronModel) NovaFloatingIP(ipId string) (*nova.FloatingIP, error)
- func (n *NeutronModel) NovaFloatingIPByAddr(address string) (*nova.FloatingIP, error)
- func (n *NeutronModel) NovaNetwork(networkId string) (*nova.Network, error)
- func (n *NeutronModel) NovaSecurityGroup(groupId string) (*nova.SecurityGroup, error)
- func (n *NeutronModel) NovaSecurityGroupByName(groupName string) (*nova.SecurityGroup, error)
- func (n *NeutronModel) NovaSecurityGroupRule(ruleId string) (*nova.SecurityGroupRule, error)
- func (n *NeutronModel) Port(portId string) (*neutron.PortV2, error)
- func (n *NeutronModel) RemoveFloatingIP(ipId string) error
- func (n *NeutronModel) RemoveNetwork(netId string) error
- func (n *NeutronModel) RemovePort(portId string) error
- func (n *NeutronModel) RemoveSecurityGroup(groupId string) error
- func (n *NeutronModel) RemoveSecurityGroupRule(ruleId string) error
- func (n *NeutronModel) SecurityGroup(groupId string) (*neutron.SecurityGroupV2, error)
- func (n *NeutronModel) SecurityGroupByName(groupName string) ([]neutron.SecurityGroupV2, error)
- func (n *NeutronModel) SecurityGroupRule(ruleId string) (*neutron.SecurityGroupRuleV2, error)
- func (n *NeutronModel) UpdateNovaFloatingIP(fip *nova.FloatingIP) error
- func (n *NeutronModel) UpdateNovaSecurityGroup(group nova.SecurityGroup) error
- func (n *NeutronModel) UpdateSecurityGroup(group neutron.SecurityGroupV2) error
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) AddPort ¶
func (n *NeutronModel) AddPort(port neutron.PortV2) error
AddPort creates a new port given a neutron.PortV2.
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) AllPorts ¶
func (n *NeutronModel) AllPorts() []neutron.PortV2
AllPorts returns a list of all existing ports, data in neutron.PortV2 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) Port ¶
func (n *NeutronModel) Port(portId string) (*neutron.PortV2, error)
Port retrieves an existing port by ID, data in neutron.PortV2 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) RemovePort ¶
func (n *NeutronModel) RemovePort(portId string) error
RemovePort 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.