Documentation
¶
Index ¶
- Constants
- Variables
- func CheckSubnetsOverlap(cidr1, cidr2 string) (bool, error)
- func CreateTagName(tagType, tagValue string) string
- func IsRouteTargetUserDefined(routeTarget string, globalAsn int64) (bool, error)
- func RouteTargetString(asn int64, target int64) string
- func TagTypeValueFromFQName(fqName []string) (tagType, tagValue string)
- func TagTypeValueFromName(name string) (tagType, tagValue string)
- type APIAccessLists
- type PolicyAddressPair
- type PolicyRulesWithRefs
- type PropCollectionUpdate
Constants ¶
const ( // AnySecurityGroup matches any security group in AddressType. AnySecurityGroup = "any" // LocalSecurityGroup matches the local security group in AddressType. LocalSecurityGroup = "local" // UnspecifiedSecurityGroup doesn't match against the security group in AddressType. UnspecifiedSecurityGroup = "" // IPv4ZeroValue is the zero IPv4 address. IPv4ZeroValue = "0.0.0.0" // IPv6ZeroValue is the zero IPv6 address. IPv6ZeroValue = "::" )
const ( DefaultPortRangeStart = 50000 DefaultPortRangeEnd = 50512 )
BGP constants.
const ( //L3VPNType is one of BGPVPN types L3VPNType = "l3" //L2VPNType is one of BGPVPN types L2VPNType = "l2" )
const ( DefaultMatchTagType = "application" FirewallPolicyTagNameGlobalPrefix = "global:" Endpoint1Index = 1 Endpoint2Index = 2 )
FirewallRule constants.
const ( UserDefinedSubnet = "user-defined-subnet" AutoSubnet = "auto-subnet" FlatSubnet = "flat-subnet" )
IPAM subnet methods.
const ( // SRCToDSTDirection is the standard direction in PolicyRuleType. SRCToDSTDirection = ">" // IPv6Ethertype is the Ethertype for IPv6. IPv6Ethertype = "IPv6" // IPv4Ethertype is the Ethertype for IPv4. IPv4Ethertype = "IPv4" // AnyProtocol matches any protocol in PolicyRuleType. AnyProtocol = "any" // ICMPProtocol matches ICMP protocol in PolicyRuleType. ICMPProtocol = "icmp" // TCPProtocol matches TCP protocol in PolicyRuleType. TCPProtocol = "tcp" // UDPProtocol matches UDP protocol in PolicyRuleType. UDPProtocol = "udp" // ICMP6Protocol matches ICMPv6 protocol in PolicyRuleType. ICMP6Protocol = "icmp6" )
const ( PropCollectionUpdateOperationAdd = "add" PropCollectionUpdateOperationModify = "modify" PropCollectionUpdateOperationSet = "set" PropCollectionUpdateOperationDelete = "delete" )
PropCollectionUpdate operations.
const ( L3Mode = "l3" L2L3Mode = "l2_l3" )
Virtual network forwarding modes.
const ( UserDefinedSubnetOnly = "user-defined-subnet-only" UserDefinedSubnetPreferred = "user-defined-subnet-preferred" FlatSubnetOnly = "flat-subnet-only" )
TODO: Enums strings should be generated from schema
const (
DefaultSecurityGroupName = "default"
)
DefaultSecurityGroupName is the Name of a project's default SecurityGroup.
const (
ServiceHealthCheckLinkLocalType = "link-local"
)
Available ServiceHealthCheck types.
Variables ¶
var TagTypeIDs = map[string]int64{
"label": 0,
"application": 1,
"tier": 2,
"deployment": 3,
"site": 4,
}
TagTypeIDs contains tag-type names with corresponding ids
Functions ¶
func CheckSubnetsOverlap ¶
CheckSubnetsOverlap checks if subnets overlaps.
func CreateTagName ¶
CreateTagName constructs tag name from it's type and value.
func IsRouteTargetUserDefined ¶
IsRouteTargetUserDefined checks if route target was user defined.
func RouteTargetString ¶
RouteTargetString constructs route target string for given asn and target number.
func TagTypeValueFromFQName ¶
TagTypeValueFromFQName extracts type and value from tag's fqName.
func TagTypeValueFromName ¶
TagTypeValueFromName extracts type and value from tag's name.
Types ¶
type APIAccessLists ¶
type APIAccessLists []*APIAccessList
APIAccessLists is a type in models package corresponding to []*rbac.APIAccessList.
func (APIAccessLists) ToRBAC ¶
func (a APIAccessLists) ToRBAC() []*rbac.APIAccessList
ToRBAC translates objects to []*rbac.APIAccessList.
type PolicyAddressPair ¶
type PolicyAddressPair struct { PolicyRule *PolicyRuleType SourceAddress, DestinationAddress *AddressType SourcePort, DestinationPort *PortType }
PolicyAddressPair is a single combination of source and destination specifications from a PolicyRuleType.
func (*PolicyAddressPair) IsIngress ¶
func (pair *PolicyAddressPair) IsIngress() (bool, error)
IsIngress checks whether the pair is ingress (remote to local addresses) or egress (local to remote addresses).
type PolicyRulesWithRefs ¶
type PolicyRulesWithRefs struct { Rules []*PolicyRuleType FQNameToSG map[string]*SecurityGroup }
PolicyRulesWithRefs is a list of policy rules together with resolved references to security groups whose names are mentioned in the rules.
func (*PolicyRulesWithRefs) ToACLRules ¶
func (rs *PolicyRulesWithRefs) ToACLRules() (ingressRules, egressRules []*AclRuleType)
ToACLRules translates policy rules to ACL rules.
type PropCollectionUpdate ¶
type PropCollectionUpdate struct { Field string Operation string Value interface{} Position interface{} }
PropCollectionUpdate holds update data for collection property (with CollectionType "map" or "list").
func (*PropCollectionUpdate) KeyForMap ¶
func (u *PropCollectionUpdate) KeyForMap() (key string, err error)
KeyForMap validates MapProperty collection update.
func (*PropCollectionUpdate) PositionForList ¶
func (u *PropCollectionUpdate) PositionForList() (position int, err error)
PositionForList parses position and validates operation for ListProperty collection update.
Source Files
¶
- address_type.go
- alarm.go
- alias_ip_pool.go
- bgpaa_service_parameters_type.go
- bgpvpn.go
- firewall_policy.go
- firewall_refs.go
- firewall_rule.go
- firewall_rule_endpoint_type.go
- floating_ip.go
- floating_ip_pool.go
- id_perms.go
- interface_route_table.go
- ipam_subnet_type.go
- ipam_subnets.go
- key_value_pairs.go
- logical_interface.go
- logical_router.go
- mac_address_type.go
- net.go
- network_ipam.go
- perm_type2.go
- permissions.go
- physical_interface.go
- policy_entries_type.go
- policy_rule_type.go
- port_type.go
- project.go
- prop_collection.go
- qos_config.go
- qos_id_forwarding_class_pair_type.go
- rbac.go
- route_target.go
- routing_instance.go
- security_group_acl_rules.go
- service_health_check.go
- subnet_type.go
- tag.go
- tag_type.go
- user_defined_log_stat_list.go
- virtual_machine_interface.go
- virtual_network.go
- virtual_network_network_ipam_ref.go
- virtual_router.go
- vn_subnet.go