contivModel

package module
Version: v0.0.0-...-17ac0a5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoutes

func AddRoutes(router *mux.Router)

Add all routes for REST handlers

func CreateAciGw

func CreateAciGw(obj *AciGw) error

Create a aciGw object

func CreateAppProfile

func CreateAppProfile(obj *AppProfile) error

Create a appProfile object

func CreateBgp

func CreateBgp(obj *Bgp) error

Create a Bgp object

func CreateEndpointGroup

func CreateEndpointGroup(obj *EndpointGroup) error

Create a endpointGroup object

func CreateExtContractsGroup

func CreateExtContractsGroup(obj *ExtContractsGroup) error

Create a extContractsGroup object

func CreateGlobal

func CreateGlobal(obj *Global) error

Create a global object

func CreateNetprofile

func CreateNetprofile(obj *Netprofile) error

Create a netprofile object

func CreateNetwork

func CreateNetwork(obj *Network) error

Create a network object

func CreatePolicy

func CreatePolicy(obj *Policy) error

Create a policy object

func CreateRule

func CreateRule(obj *Rule) error

Create a rule object

func CreateServiceLB

func CreateServiceLB(obj *ServiceLB) error

Create a serviceLB object

func CreateTenant

func CreateTenant(obj *Tenant) error

Create a tenant object

func CreateVolume

func CreateVolume(obj *Volume) error

Create a volume object

func CreateVolumeProfile

func CreateVolumeProfile(obj *VolumeProfile) error

Create a volumeProfile object

func DeleteAciGw

func DeleteAciGw(key string) error

Delete a aciGw object

func DeleteAppProfile

func DeleteAppProfile(key string) error

Delete a appProfile object

func DeleteBgp

func DeleteBgp(key string) error

Delete a Bgp object

func DeleteEndpointGroup

func DeleteEndpointGroup(key string) error

Delete a endpointGroup object

func DeleteExtContractsGroup

func DeleteExtContractsGroup(key string) error

Delete a extContractsGroup object

func DeleteGlobal

func DeleteGlobal(key string) error

Delete a global object

func DeleteNetprofile

func DeleteNetprofile(key string) error

Delete a netprofile object

func DeleteNetwork

func DeleteNetwork(key string) error

Delete a network object

func DeletePolicy

func DeletePolicy(key string) error

Delete a policy object

func DeleteRule

func DeleteRule(key string) error

Delete a rule object

func DeleteServiceLB

func DeleteServiceLB(key string) error

Delete a serviceLB object

func DeleteTenant

func DeleteTenant(key string) error

Delete a tenant object

func DeleteVolume

func DeleteVolume(key string) error

Delete a volume object

func DeleteVolumeProfile

func DeleteVolumeProfile(key string) error

Delete a volumeProfile object

func GetAciGwCount

func GetAciGwCount() int

func GetAppProfileCount

func GetAppProfileCount() int

func GetBgpCount

func GetBgpCount() int

func GetEndpointGroupCount

func GetEndpointGroupCount() int

func GetExtContractsGroupCount

func GetExtContractsGroupCount() int

func GetGlobalCount

func GetGlobalCount() int

func GetNetprofileCount

func GetNetprofileCount() int

func GetNetworkCount

func GetNetworkCount() int

func GetOperAciGw

func GetOperAciGw(obj *AciGwInspect) error

Get a aciGwOper object

func GetOperBgp

func GetOperBgp(obj *BgpInspect) error

Get a BgpOper object

func GetOperEndpoint

func GetOperEndpoint(obj *EndpointInspect) error

Get a endpointOper object

func GetOperEndpointGroup

func GetOperEndpointGroup(obj *EndpointGroupInspect) error

Get a endpointGroupOper object

func GetOperGlobal

func GetOperGlobal(obj *GlobalInspect) error

Get a globalOper object

func GetOperNetwork

func GetOperNetwork(obj *NetworkInspect) error

Get a networkOper object

func GetOperPolicy

func GetOperPolicy(obj *PolicyInspect) error

Get a policyOper object

func GetOperServiceLB

func GetOperServiceLB(obj *ServiceLBInspect) error

Get a serviceLBOper object

func GetOperTenant

func GetOperTenant(obj *TenantInspect) error

Get a tenantOper object

func GetPolicyCount

func GetPolicyCount() int

func GetRuleCount

func GetRuleCount() int

func GetServiceLBCount

func GetServiceLBCount() int

func GetTenantCount

func GetTenantCount() int

func GetVolumeCount

func GetVolumeCount() int

func GetVolumeProfileCount

func GetVolumeProfileCount() int

func Init

func Init()

func RegisterAciGwCallbacks

func RegisterAciGwCallbacks(handler AciGwCallbacks)

func RegisterAppProfileCallbacks

func RegisterAppProfileCallbacks(handler AppProfileCallbacks)

func RegisterBgpCallbacks

func RegisterBgpCallbacks(handler BgpCallbacks)

func RegisterEndpointCallbacks

func RegisterEndpointCallbacks(handler EndpointCallbacks)

func RegisterEndpointGroupCallbacks

func RegisterEndpointGroupCallbacks(handler EndpointGroupCallbacks)

func RegisterExtContractsGroupCallbacks

func RegisterExtContractsGroupCallbacks(handler ExtContractsGroupCallbacks)

func RegisterGlobalCallbacks

func RegisterGlobalCallbacks(handler GlobalCallbacks)

func RegisterNetprofileCallbacks

func RegisterNetprofileCallbacks(handler NetprofileCallbacks)

func RegisterNetworkCallbacks

func RegisterNetworkCallbacks(handler NetworkCallbacks)

func RegisterPolicyCallbacks

func RegisterPolicyCallbacks(handler PolicyCallbacks)

func RegisterRuleCallbacks

func RegisterRuleCallbacks(handler RuleCallbacks)

func RegisterServiceLBCallbacks

func RegisterServiceLBCallbacks(handler ServiceLBCallbacks)

func RegisterTenantCallbacks

func RegisterTenantCallbacks(handler TenantCallbacks)

func RegisterVolumeCallbacks

func RegisterVolumeCallbacks(handler VolumeCallbacks)

func RegisterVolumeProfileCallbacks

func RegisterVolumeProfileCallbacks(handler VolumeProfileCallbacks)

func ValidateAciGw

func ValidateAciGw(obj *AciGw) error

Validate a aciGw object

func ValidateAppProfile

func ValidateAppProfile(obj *AppProfile) error

Validate a appProfile object

func ValidateBgp

func ValidateBgp(obj *Bgp) error

Validate a Bgp object

func ValidateEndpointGroup

func ValidateEndpointGroup(obj *EndpointGroup) error

Validate a endpointGroup object

func ValidateExtContractsGroup

func ValidateExtContractsGroup(obj *ExtContractsGroup) error

Validate a extContractsGroup object

func ValidateGlobal

func ValidateGlobal(obj *Global) error

Validate a global object

func ValidateNetprofile

func ValidateNetprofile(obj *Netprofile) error

Validate a netprofile object

func ValidateNetwork

func ValidateNetwork(obj *Network) error

Validate a network object

func ValidatePolicy

func ValidatePolicy(obj *Policy) error

Validate a policy object

func ValidateRule

func ValidateRule(obj *Rule) error

Validate a rule object

func ValidateServiceLB

func ValidateServiceLB(obj *ServiceLB) error

Validate a serviceLB object

func ValidateTenant

func ValidateTenant(obj *Tenant) error

Validate a tenant object

func ValidateVolume

func ValidateVolume(obj *Volume) error

Validate a volume object

func ValidateVolumeProfile

func ValidateVolumeProfile(obj *VolumeProfile) error

Validate a volumeProfile object

Types

type AciGw

type AciGw struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	EnforcePolicies     string `json:"enforcePolicies,omitempty"`     // Enforce security policy
	IncludeCommonTenant string `json:"includeCommonTenant,omitempty"` // Include common tenant when searching for objects
	Name                string `json:"name,omitempty"`                // name of this block(must be 'aciGw')
	NodeBindings        string `json:"nodeBindings,omitempty"`        // List of ACI complete nodes to be bound
	PathBindings        string `json:"pathBindings,omitempty"`        // List of ACI fabric ports connected to cluster
	PhysicalDomain      string `json:"physicalDomain,omitempty"`      // Name of the physical domain

}

func FindAciGw

func FindAciGw(key string) *AciGw

Return a pointer to aciGw from collection

func (*AciGw) Delete

func (self *AciGw) Delete() error

func (*AciGw) GetKey

func (self *AciGw) GetKey() string

func (*AciGw) GetType

func (self *AciGw) GetType() string

func (*AciGw) Read

func (self *AciGw) Read() error

func (*AciGw) Write

func (self *AciGw) Write() error

type AciGwCallbacks

type AciGwCallbacks interface {
	AciGwGetOper(aciGw *AciGwInspect) error

	AciGwCreate(aciGw *AciGw) error
	AciGwUpdate(aciGw, params *AciGw) error
	AciGwDelete(aciGw *AciGw) error
}

type AciGwInspect

type AciGwInspect struct {
	Config AciGw

	Oper AciGwOper
}

type AciGwOper

type AciGwOper struct {
	NumAppProfiles int `json:"numAppProfiles,omitempty"` //

}

type AppProfile

type AppProfile struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	AppProfileName string   `json:"appProfileName,omitempty"` // Application Profile Name
	EndpointGroups []string `json:"endpointGroups,omitempty"`
	TenantName     string   `json:"tenantName,omitempty"` // Tenant Name

	// add link-sets and links
	LinkSets AppProfileLinkSets `json:"link-sets,omitempty"`
	Links    AppProfileLinks    `json:"links,omitempty"`
}

func FindAppProfile

func FindAppProfile(key string) *AppProfile

Return a pointer to appProfile from collection

func (*AppProfile) Delete

func (self *AppProfile) Delete() error

func (*AppProfile) GetKey

func (self *AppProfile) GetKey() string

func (*AppProfile) GetType

func (self *AppProfile) GetType() string

func (*AppProfile) Read

func (self *AppProfile) Read() error

func (*AppProfile) Write

func (self *AppProfile) Write() error

type AppProfileCallbacks

type AppProfileCallbacks interface {
	AppProfileCreate(appProfile *AppProfile) error
	AppProfileUpdate(appProfile, params *AppProfile) error
	AppProfileDelete(appProfile *AppProfile) error
}

type AppProfileInspect

type AppProfileInspect struct {
	Config AppProfile
}

type AppProfileLinkSets

type AppProfileLinkSets struct {
	EndpointGroups map[string]modeldb.Link `json:"EndpointGroups,omitempty"`
}
type AppProfileLinks struct {
	Tenant modeldb.Link `json:"Tenant,omitempty"`
}

type Bgp

type Bgp struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	As         string `json:"as,omitempty"`          // AS id
	Hostname   string `json:"hostname,omitempty"`    // host name
	Neighbor   string `json:"neighbor,omitempty"`    // Bgp  neighbor
	NeighborAs string `json:"neighbor-as,omitempty"` // AS id
	Routerip   string `json:"routerip,omitempty"`    // Bgp router intf ip

}

func FindBgp

func FindBgp(key string) *Bgp

Return a pointer to Bgp from collection

func (*Bgp) Delete

func (self *Bgp) Delete() error

func (*Bgp) GetKey

func (self *Bgp) GetKey() string

func (*Bgp) GetType

func (self *Bgp) GetType() string

func (*Bgp) Read

func (self *Bgp) Read() error

func (*Bgp) Write

func (self *Bgp) Write() error

type BgpCallbacks

type BgpCallbacks interface {
	BgpGetOper(Bgp *BgpInspect) error

	BgpCreate(Bgp *Bgp) error
	BgpUpdate(Bgp, params *Bgp) error
	BgpDelete(Bgp *Bgp) error
}

type BgpInspect

type BgpInspect struct {
	Config Bgp

	Oper BgpOper
}

type BgpOper

type BgpOper struct {
	AdminStatus    string   `json:"adminStatus,omitempty"`    // admin status
	NeighborStatus string   `json:"neighborStatus,omitempty"` // neighbor status
	NumRoutes      int      `json:"numRoutes,omitempty"`      // number of routes
	Routes         []string `json:"routes,omitempty"`
}

type CallbackHandlers

type CallbackHandlers struct {
	AciGwCb             AciGwCallbacks
	AppProfileCb        AppProfileCallbacks
	BgpCb               BgpCallbacks
	EndpointCb          EndpointCallbacks
	EndpointGroupCb     EndpointGroupCallbacks
	ExtContractsGroupCb ExtContractsGroupCallbacks
	GlobalCb            GlobalCallbacks
	NetprofileCb        NetprofileCallbacks
	NetworkCb           NetworkCallbacks
	PolicyCb            PolicyCallbacks
	RuleCb              RuleCallbacks
	ServiceLBCb         ServiceLBCallbacks
	TenantCb            TenantCallbacks
	VolumeCb            VolumeCallbacks
	VolumeProfileCb     VolumeProfileCallbacks
}

type Collections

type Collections struct {
	BgpMutex sync.Mutex
	Bgps     map[string]*Bgp
	// contains filtered or unexported fields
}

type EndpointCallbacks

type EndpointCallbacks interface {
	EndpointGetOper(endpoint *EndpointInspect) error
}

type EndpointGroup

type EndpointGroup struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	CfgdTag          string   `json:"cfgdTag,omitempty"` // Configured Group Tag
	ExtContractsGrps []string `json:"extContractsGrps,omitempty"`
	GroupName        string   `json:"groupName,omitempty"`   // Group name
	IpPool           string   `json:"ipPool,omitempty"`      // IP-pool
	NetProfile       string   `json:"netProfile,omitempty"`  // Network profile name
	NetworkName      string   `json:"networkName,omitempty"` // Network
	Policies         []string `json:"policies,omitempty"`
	TenantName       string   `json:"tenantName,omitempty"` // Tenant

	// add link-sets and links
	LinkSets EndpointGroupLinkSets `json:"link-sets,omitempty"`
	Links    EndpointGroupLinks    `json:"links,omitempty"`
}

func FindEndpointGroup

func FindEndpointGroup(key string) *EndpointGroup

Return a pointer to endpointGroup from collection

func (*EndpointGroup) Delete

func (self *EndpointGroup) Delete() error

func (*EndpointGroup) GetKey

func (self *EndpointGroup) GetKey() string

func (*EndpointGroup) GetType

func (self *EndpointGroup) GetType() string

func (*EndpointGroup) Read

func (self *EndpointGroup) Read() error

func (*EndpointGroup) Write

func (self *EndpointGroup) Write() error

type EndpointGroupCallbacks

type EndpointGroupCallbacks interface {
	EndpointGroupGetOper(endpointGroup *EndpointGroupInspect) error

	EndpointGroupCreate(endpointGroup *EndpointGroup) error
	EndpointGroupUpdate(endpointGroup, params *EndpointGroup) error
	EndpointGroupDelete(endpointGroup *EndpointGroup) error
}

type EndpointGroupInspect

type EndpointGroupInspect struct {
	Config EndpointGroup

	Oper EndpointGroupOper
}

type EndpointGroupLinkSets

type EndpointGroupLinkSets struct {
	ExtContractsGrps map[string]modeldb.Link `json:"ExtContractsGrps,omitempty"`

	MatchRules map[string]modeldb.Link `json:"MatchRules,omitempty"`

	Policies map[string]modeldb.Link `json:"Policies,omitempty"`

	Services map[string]modeldb.Link `json:"Services,omitempty"`
}
type EndpointGroupLinks struct {
	AppProfile modeldb.Link `json:"AppProfile,omitempty"`

	NetProfile modeldb.Link `json:"NetProfile,omitempty"`

	Network modeldb.Link `json:"Network,omitempty"`

	Tenant modeldb.Link `json:"Tenant,omitempty"`
}

type EndpointGroupOper

type EndpointGroupOper struct {
	AllocatedIPAddresses string         `json:"allocatedIPAddresses,omitempty"` // allocated IP addresses
	AvailableIPAddresses string         `json:"availableIPAddresses,omitempty"` // Available IP addresses
	Endpoints            []EndpointOper `json:"endpoints,omitempty"`
	ExternalPktTag       int            `json:"externalPktTag,omitempty"` // external packet tag
	GroupTag             string         `json:"groupTag,omitempty"`       // Derived EndpointGroup Tag
	NumEndpoints         int            `json:"numEndpoints,omitempty"`   // number of endpoints
	PktTag               int            `json:"pktTag,omitempty"`         // internal packet tag

}

type EndpointInspect

type EndpointInspect struct {
	Oper EndpointOper
}

type EndpointOper

type EndpointOper struct {

	// oper object key (present for oper only objects)
	Key string `json:"key,omitempty"`

	ContainerID      string   `json:"containerID,omitempty"`      //
	ContainerName    string   `json:"containerName,omitempty"`    //
	EndpointGroupID  int      `json:"endpointGroupId,omitempty"`  //
	EndpointGroupKey string   `json:"endpointGroupKey,omitempty"` //
	EndpointID       string   `json:"endpointID,omitempty"`       //
	HomingHost       string   `json:"homingHost,omitempty"`       //
	IntfName         string   `json:"intfName,omitempty"`         //
	IpAddress        []string `json:"ipAddress,omitempty"`
	Labels           string   `json:"labels,omitempty"`      //
	MacAddress       string   `json:"macAddress,omitempty"`  //
	Network          string   `json:"network,omitempty"`     //
	ServiceName      string   `json:"serviceName,omitempty"` //
	VirtualPort      string   `json:"virtualPort,omitempty"` //
	VtepIP           string   `json:"vtepIP,omitempty"`      //

}

type ExtContractsGroup

type ExtContractsGroup struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	Contracts          []string `json:"contracts,omitempty"`
	ContractsGroupName string   `json:"contractsGroupName,omitempty"` // Contracts group name
	ContractsType      string   `json:"contractsType,omitempty"`      // Contracts type
	TenantName         string   `json:"tenantName,omitempty"`         // Tenant name

	// add link-sets and links
	LinkSets ExtContractsGroupLinkSets `json:"link-sets,omitempty"`
}

func FindExtContractsGroup

func FindExtContractsGroup(key string) *ExtContractsGroup

Return a pointer to extContractsGroup from collection

func (*ExtContractsGroup) Delete

func (self *ExtContractsGroup) Delete() error

func (*ExtContractsGroup) GetKey

func (self *ExtContractsGroup) GetKey() string

func (*ExtContractsGroup) GetType

func (self *ExtContractsGroup) GetType() string

func (*ExtContractsGroup) Read

func (self *ExtContractsGroup) Read() error

func (*ExtContractsGroup) Write

func (self *ExtContractsGroup) Write() error

type ExtContractsGroupCallbacks

type ExtContractsGroupCallbacks interface {
	ExtContractsGroupCreate(extContractsGroup *ExtContractsGroup) error
	ExtContractsGroupUpdate(extContractsGroup, params *ExtContractsGroup) error
	ExtContractsGroupDelete(extContractsGroup *ExtContractsGroup) error
}

type ExtContractsGroupInspect

type ExtContractsGroupInspect struct {
	Config ExtContractsGroup
}

type ExtContractsGroupLinkSets

type ExtContractsGroupLinkSets struct {
	EndpointGroups map[string]modeldb.Link `json:"EndpointGroups,omitempty"`
}

type Global

type Global struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	ArpMode          string `json:"arpMode,omitempty"`          // ARP Mode
	FwdMode          string `json:"fwdMode,omitempty"`          // Forwarding Mode
	Name             string `json:"name,omitempty"`             // name of this block(must be 'global')
	NetworkInfraType string `json:"networkInfraType,omitempty"` // Network infrastructure type
	PvtSubnet        string `json:"pvtSubnet,omitempty"`        // Private Subnet used by host bridge
	Vlans            string `json:"vlans,omitempty"`            // Allowed vlan range
	Vxlans           string `json:"vxlans,omitempty"`           // Allwed vxlan range

}

func FindGlobal

func FindGlobal(key string) *Global

Return a pointer to global from collection

func (*Global) Delete

func (self *Global) Delete() error

func (*Global) GetKey

func (self *Global) GetKey() string

func (*Global) GetType

func (self *Global) GetType() string

func (*Global) Read

func (self *Global) Read() error

func (*Global) Write

func (self *Global) Write() error

type GlobalCallbacks

type GlobalCallbacks interface {
	GlobalGetOper(global *GlobalInspect) error

	GlobalCreate(global *Global) error
	GlobalUpdate(global, params *Global) error
	GlobalDelete(global *Global) error
}

type GlobalInspect

type GlobalInspect struct {
	Config Global

	Oper GlobalOper
}

type GlobalOper

type GlobalOper struct {
	ClusterMode     string `json:"clusterMode,omitempty"`     //
	DefaultNetwork  string `json:"defaultNetwork,omitempty"`  //
	FreeVXLANsStart int    `json:"freeVXLANsStart,omitempty"` //
	NumNetworks     int    `json:"numNetworks,omitempty"`     //
	VlansInUse      string `json:"vlansInUse,omitempty"`      //
	VxlansInUse     string `json:"vxlansInUse,omitempty"`     //

}

type HttpApiFunc

type HttpApiFunc func(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)

type Netprofile

type Netprofile struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	DSCP        int    `json:"DSCP,omitempty"`        // DSCP
	Bandwidth   string `json:"bandwidth,omitempty"`   // Allocated bandwidth
	Burst       int    `json:"burst,omitempty"`       // burst size
	ProfileName string `json:"profileName,omitempty"` // Network profile name
	TenantName  string `json:"tenantName,omitempty"`  // Tenant name

	// add link-sets and links
	LinkSets NetprofileLinkSets `json:"link-sets,omitempty"`
	Links    NetprofileLinks    `json:"links,omitempty"`
}

func FindNetprofile

func FindNetprofile(key string) *Netprofile

Return a pointer to netprofile from collection

func (*Netprofile) Delete

func (self *Netprofile) Delete() error

func (*Netprofile) GetKey

func (self *Netprofile) GetKey() string

func (*Netprofile) GetType

func (self *Netprofile) GetType() string

func (*Netprofile) Read

func (self *Netprofile) Read() error

func (*Netprofile) Write

func (self *Netprofile) Write() error

type NetprofileCallbacks

type NetprofileCallbacks interface {
	NetprofileCreate(netprofile *Netprofile) error
	NetprofileUpdate(netprofile, params *Netprofile) error
	NetprofileDelete(netprofile *Netprofile) error
}

type NetprofileInspect

type NetprofileInspect struct {
	Config Netprofile
}

type NetprofileLinkSets

type NetprofileLinkSets struct {
	EndpointGroups map[string]modeldb.Link `json:"EndpointGroups,omitempty"`
}
type NetprofileLinks struct {
	Tenant modeldb.Link `json:"Tenant,omitempty"`
}

type Network

type Network struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	CfgdTag     string `json:"cfgdTag,omitempty"`     // Configured Network Tag
	Encap       string `json:"encap,omitempty"`       // Encapsulation
	Gateway     string `json:"gateway,omitempty"`     // Gateway
	Ipv6Gateway string `json:"ipv6Gateway,omitempty"` // IPv6Gateway
	Ipv6Subnet  string `json:"ipv6Subnet,omitempty"`  // IPv6Subnet
	NetworkName string `json:"networkName,omitempty"` // Network name
	NwType      string `json:"nwType,omitempty"`      // Network Type
	PktTag      int    `json:"pktTag,omitempty"`      // Vlan/Vxlan Tag
	Subnet      string `json:"subnet,omitempty"`      // Subnet
	TenantName  string `json:"tenantName,omitempty"`  // Tenant Name

	// add link-sets and links
	LinkSets NetworkLinkSets `json:"link-sets,omitempty"`
	Links    NetworkLinks    `json:"links,omitempty"`
}

func FindNetwork

func FindNetwork(key string) *Network

Return a pointer to network from collection

func (*Network) Delete

func (self *Network) Delete() error

func (*Network) GetKey

func (self *Network) GetKey() string

func (*Network) GetType

func (self *Network) GetType() string

func (*Network) Read

func (self *Network) Read() error

func (*Network) Write

func (self *Network) Write() error

type NetworkCallbacks

type NetworkCallbacks interface {
	NetworkGetOper(network *NetworkInspect) error

	NetworkCreate(network *Network) error
	NetworkUpdate(network, params *Network) error
	NetworkDelete(network *Network) error
}

type NetworkInspect

type NetworkInspect struct {
	Config Network

	Oper NetworkOper
}

type NetworkLinkSets

type NetworkLinkSets struct {
	EndpointGroups map[string]modeldb.Link `json:"EndpointGroups,omitempty"`

	Servicelbs map[string]modeldb.Link `json:"Servicelbs,omitempty"`

	Services map[string]modeldb.Link `json:"Services,omitempty"`
}
type NetworkLinks struct {
	Tenant modeldb.Link `json:"Tenant,omitempty"`
}

type NetworkOper

type NetworkOper struct {
	AllocatedAddressesCount int            `json:"allocatedAddressesCount,omitempty"` // Vlan/Vxlan Tag
	AllocatedIPAddresses    string         `json:"allocatedIPAddresses,omitempty"`    // allocated IP addresses
	AvailableIPAddresses    string         `json:"availableIPAddresses,omitempty"`    // Available IP addresses
	Endpoints               []EndpointOper `json:"endpoints,omitempty"`
	ExternalPktTag          int            `json:"externalPktTag,omitempty"` // external packet tag
	NetworkTag              string         `json:"networkTag,omitempty"`     // Derived Network Tag
	NumEndpoints            int            `json:"numEndpoints,omitempty"`   // external packet tag
	PktTag                  int            `json:"pktTag,omitempty"`         // internal packet tag

}

type Policy

type Policy struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	PolicyName string `json:"policyName,omitempty"` // Policy Name
	TenantName string `json:"tenantName,omitempty"` // Tenant Name

	// add link-sets and links
	LinkSets PolicyLinkSets `json:"link-sets,omitempty"`
	Links    PolicyLinks    `json:"links,omitempty"`
}

func FindPolicy

func FindPolicy(key string) *Policy

Return a pointer to policy from collection

func (*Policy) Delete

func (self *Policy) Delete() error

func (*Policy) GetKey

func (self *Policy) GetKey() string

func (*Policy) GetType

func (self *Policy) GetType() string

func (*Policy) Read

func (self *Policy) Read() error

func (*Policy) Write

func (self *Policy) Write() error

type PolicyCallbacks

type PolicyCallbacks interface {
	PolicyGetOper(policy *PolicyInspect) error

	PolicyCreate(policy *Policy) error
	PolicyUpdate(policy, params *Policy) error
	PolicyDelete(policy *Policy) error
}

type PolicyInspect

type PolicyInspect struct {
	Config Policy

	Oper PolicyOper
}

type PolicyLinkSets

type PolicyLinkSets struct {
	EndpointGroups map[string]modeldb.Link `json:"EndpointGroups,omitempty"`

	Rules map[string]modeldb.Link `json:"Rules,omitempty"`
}
type PolicyLinks struct {
	Tenant modeldb.Link `json:"Tenant,omitempty"`
}

type PolicyOper

type PolicyOper struct {
	Endpoints        []EndpointOper `json:"endpoints,omitempty"`
	NumEndpoints     int            `json:"numEndpoints,omitempty"`     // number of endpoints
	PolicyViolations int            `json:"policyViolations,omitempty"` // number of policyViolations

}

type Rule

type Rule struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	Action            string `json:"action,omitempty"`            // Action
	Direction         string `json:"direction,omitempty"`         // Direction
	FromEndpointGroup string `json:"fromEndpointGroup,omitempty"` // From Endpoint Group
	FromIpAddress     string `json:"fromIpAddress,omitempty"`     // IP Address
	FromNetwork       string `json:"fromNetwork,omitempty"`       // From Network
	PolicyName        string `json:"policyName,omitempty"`        // Policy Name
	Port              int    `json:"port,omitempty"`              // Port No
	Priority          int    `json:"priority,omitempty"`          // Priority
	Protocol          string `json:"protocol,omitempty"`          // Protocol
	RuleID            string `json:"ruleId,omitempty"`            // Rule Id
	TenantName        string `json:"tenantName,omitempty"`        // Tenant Name
	ToEndpointGroup   string `json:"toEndpointGroup,omitempty"`   // To Endpoint Group
	ToIpAddress       string `json:"toIpAddress,omitempty"`       // IP Address
	ToNetwork         string `json:"toNetwork,omitempty"`         // To Network

	// add link-sets and links
	LinkSets RuleLinkSets `json:"link-sets,omitempty"`
	Links    RuleLinks    `json:"links,omitempty"`
}

func FindRule

func FindRule(key string) *Rule

Return a pointer to rule from collection

func (*Rule) Delete

func (self *Rule) Delete() error

func (*Rule) GetKey

func (self *Rule) GetKey() string

func (*Rule) GetType

func (self *Rule) GetType() string

func (*Rule) Read

func (self *Rule) Read() error

func (*Rule) Write

func (self *Rule) Write() error

type RuleCallbacks

type RuleCallbacks interface {
	RuleCreate(rule *Rule) error
	RuleUpdate(rule, params *Rule) error
	RuleDelete(rule *Rule) error
}

type RuleInspect

type RuleInspect struct {
	Config Rule
}

type RuleLinkSets

type RuleLinkSets struct {
	Policies map[string]modeldb.Link `json:"Policies,omitempty"`
}
type RuleLinks struct {
	MatchEndpointGroup modeldb.Link `json:"MatchEndpointGroup,omitempty"`
}

type ServiceLB

type ServiceLB struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	IpAddress   string   `json:"ipAddress,omitempty"`   // Service ip
	NetworkName string   `json:"networkName,omitempty"` // Service network name
	Ports       []string `json:"ports,omitempty"`
	Selectors   []string `json:"selectors,omitempty"`
	ServiceName string   `json:"serviceName,omitempty"` // service name
	TenantName  string   `json:"tenantName,omitempty"`  // Tenant Name

	Links ServiceLBLinks `json:"links,omitempty"`
}

func FindServiceLB

func FindServiceLB(key string) *ServiceLB

Return a pointer to serviceLB from collection

func (*ServiceLB) Delete

func (self *ServiceLB) Delete() error

func (*ServiceLB) GetKey

func (self *ServiceLB) GetKey() string

func (*ServiceLB) GetType

func (self *ServiceLB) GetType() string

func (*ServiceLB) Read

func (self *ServiceLB) Read() error

func (*ServiceLB) Write

func (self *ServiceLB) Write() error

type ServiceLBCallbacks

type ServiceLBCallbacks interface {
	ServiceLBGetOper(serviceLB *ServiceLBInspect) error

	ServiceLBCreate(serviceLB *ServiceLB) error
	ServiceLBUpdate(serviceLB, params *ServiceLB) error
	ServiceLBDelete(serviceLB *ServiceLB) error
}

type ServiceLBInspect

type ServiceLBInspect struct {
	Config ServiceLB

	Oper ServiceLBOper
}
type ServiceLBLinks struct {
	Network modeldb.Link `json:"Network,omitempty"`

	Tenant modeldb.Link `json:"Tenant,omitempty"`
}

type ServiceLBOper

type ServiceLBOper struct {
	NumProviders int            `json:"numProviders,omitempty"` //  number of provider endpoints for the service
	Providers    []EndpointOper `json:"providers,omitempty"`
	ServiceVip   string         `json:"serviceVip,omitempty"` // allocated IP addresses

}

type Tenant

type Tenant struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	DefaultNetwork string `json:"defaultNetwork,omitempty"` // Network name
	TenantName     string `json:"tenantName,omitempty"`     // Tenant Name

	// add link-sets and links
	LinkSets TenantLinkSets `json:"link-sets,omitempty"`
}

func FindTenant

func FindTenant(key string) *Tenant

Return a pointer to tenant from collection

func (*Tenant) Delete

func (self *Tenant) Delete() error

func (*Tenant) GetKey

func (self *Tenant) GetKey() string

func (*Tenant) GetType

func (self *Tenant) GetType() string

func (*Tenant) Read

func (self *Tenant) Read() error

func (*Tenant) Write

func (self *Tenant) Write() error

type TenantCallbacks

type TenantCallbacks interface {
	TenantGetOper(tenant *TenantInspect) error

	TenantCreate(tenant *Tenant) error
	TenantUpdate(tenant, params *Tenant) error
	TenantDelete(tenant *Tenant) error
}

type TenantInspect

type TenantInspect struct {
	Config Tenant

	Oper TenantOper
}

type TenantLinkSets

type TenantLinkSets struct {
	AppProfiles map[string]modeldb.Link `json:"AppProfiles,omitempty"`

	EndpointGroups map[string]modeldb.Link `json:"EndpointGroups,omitempty"`

	NetProfiles map[string]modeldb.Link `json:"NetProfiles,omitempty"`

	Networks map[string]modeldb.Link `json:"Networks,omitempty"`

	Policies map[string]modeldb.Link `json:"Policies,omitempty"`

	Servicelbs map[string]modeldb.Link `json:"Servicelbs,omitempty"`

	VolumeProfiles map[string]modeldb.Link `json:"VolumeProfiles,omitempty"`

	Volumes map[string]modeldb.Link `json:"Volumes,omitempty"`
}

type TenantOper

type TenantOper struct {
	EndpointGroups   []EndpointGroupOper `json:"endpointGroups,omitempty"`
	Endpoints        []EndpointOper      `json:"endpoints,omitempty"`
	Networks         []NetworkOper       `json:"networks,omitempty"`
	Policies         []PolicyOper        `json:"policies,omitempty"`
	Servicelbs       []ServiceLBOper     `json:"servicelbs,omitempty"`
	TotalAppProfiles int                 `json:"totalAppProfiles,omitempty"` // total number of App-Profiles
	TotalEPGs        int                 `json:"totalEPGs,omitempty"`        // total number of EPGs
	TotalEndpoints   int                 `json:"totalEndpoints,omitempty"`   // total number of endpoints in the tenant
	TotalNetprofiles int                 `json:"totalNetprofiles,omitempty"` // total number of Netprofiles
	TotalNetworks    int                 `json:"totalNetworks,omitempty"`    // total number of networks
	TotalPolicies    int                 `json:"totalPolicies,omitempty"`    // total number of totalPolicies
	TotalServicelbs  int                 `json:"totalServicelbs,omitempty"`  // total number of Servicelbs

}

type Volume

type Volume struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	DatastoreType string `json:"datastoreType,omitempty"` //
	MountPoint    string `json:"mountPoint,omitempty"`    //
	PoolName      string `json:"poolName,omitempty"`      //
	Size          string `json:"size,omitempty"`          //
	TenantName    string `json:"tenantName,omitempty"`    // Tenant Name
	VolumeName    string `json:"volumeName,omitempty"`    // Volume Name

	// add link-sets and links
	LinkSets VolumeLinkSets `json:"link-sets,omitempty"`
	Links    VolumeLinks    `json:"links,omitempty"`
}

func FindVolume

func FindVolume(key string) *Volume

Return a pointer to volume from collection

func (*Volume) Delete

func (self *Volume) Delete() error

func (*Volume) GetKey

func (self *Volume) GetKey() string

func (*Volume) GetType

func (self *Volume) GetType() string

func (*Volume) Read

func (self *Volume) Read() error

func (*Volume) Write

func (self *Volume) Write() error

type VolumeCallbacks

type VolumeCallbacks interface {
	VolumeCreate(volume *Volume) error
	VolumeUpdate(volume, params *Volume) error
	VolumeDelete(volume *Volume) error
}

type VolumeInspect

type VolumeInspect struct {
	Config Volume
}

type VolumeLinkSets

type VolumeLinkSets struct {
	ServiceInstances map[string]modeldb.Link `json:"ServiceInstances,omitempty"`
}
type VolumeLinks struct {
	Tenant modeldb.Link `json:"Tenant,omitempty"`
}

type VolumeProfile

type VolumeProfile struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	DatastoreType     string `json:"datastoreType,omitempty"`     //
	MountPoint        string `json:"mountPoint,omitempty"`        //
	PoolName          string `json:"poolName,omitempty"`          //
	Size              string `json:"size,omitempty"`              //
	TenantName        string `json:"tenantName,omitempty"`        // Tenant Name
	VolumeProfileName string `json:"volumeProfileName,omitempty"` // Volume profile Name

	// add link-sets and links
	LinkSets VolumeProfileLinkSets `json:"link-sets,omitempty"`
	Links    VolumeProfileLinks    `json:"links,omitempty"`
}

func FindVolumeProfile

func FindVolumeProfile(key string) *VolumeProfile

Return a pointer to volumeProfile from collection

func (*VolumeProfile) Delete

func (self *VolumeProfile) Delete() error

func (*VolumeProfile) GetKey

func (self *VolumeProfile) GetKey() string

func (*VolumeProfile) GetType

func (self *VolumeProfile) GetType() string

func (*VolumeProfile) Read

func (self *VolumeProfile) Read() error

func (*VolumeProfile) Write

func (self *VolumeProfile) Write() error

type VolumeProfileCallbacks

type VolumeProfileCallbacks interface {
	VolumeProfileCreate(volumeProfile *VolumeProfile) error
	VolumeProfileUpdate(volumeProfile, params *VolumeProfile) error
	VolumeProfileDelete(volumeProfile *VolumeProfile) error
}

type VolumeProfileInspect

type VolumeProfileInspect struct {
	Config VolumeProfile
}

type VolumeProfileLinkSets

type VolumeProfileLinkSets struct {
	Services map[string]modeldb.Link `json:"Services,omitempty"`
}
type VolumeProfileLinks struct {
	Tenant modeldb.Link `json:"Tenant,omitempty"`
}

Source Files

Directories

Path Synopsis
package client provides contiv REST client implementation.
package client provides contiv REST client implementation.

Jump to

Keyboard shortcuts

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