Documentation ¶
Index ¶
- Constants
- Variables
- func AddBgp(stateDriver core.StateDriver, bgpCfg *intent.ConfigBgp) error
- func AllocAddressHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
- func CreateEndpoint(stateDriver core.StateDriver, nwCfg *mastercfg.CfgNetworkState, ...) (*mastercfg.CfgEndpointState, error)
- func CreateEndpointGroup(tenantName, networkName, groupName, ipPool, cfgdTag string) error
- func CreateEndpointHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
- func CreateEndpoints(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func CreateEpBindings(epBindings *[]intent.ConfigEP) error
- func CreateGlobal(stateDriver core.StateDriver, gc *intent.ConfigGlobal) error
- func CreateNetwork(network intent.ConfigNetwork, stateDriver core.StateDriver, tenantName string) error
- func CreateNetworks(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func CreateServiceLB(stateDriver core.StateDriver, serviceLbCfg *intent.ConfigServiceLB) error
- func CreateTenant(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func DeleteBgp(stateDriver core.StateDriver, hostname string) error
- func DeleteEndpointGroup(tenantName, groupName string) error
- func DeleteEndpointHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
- func DeleteEndpointID(stateDriver core.StateDriver, epID string) (*mastercfg.CfgEndpointState, error)
- func DeleteEndpoints(hostAddr string) error
- func DeleteGlobal(stateDriver core.StateDriver) error
- func DeleteNetworkID(stateDriver core.StateDriver, netID string) error
- func DeleteNetworks(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func DeleteServiceLB(stateDriver core.StateDriver, serviceName string, tenantName string) error
- func DeleteTenant(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func GetClusterMode() string
- func GetServiceID(servicename string, tenantname string) string
- func IsAciConfigured() (res bool, err error)
- func ListAllocatedIPs(nwCfg *mastercfg.CfgNetworkState) string
- func ListAvailableIPs(nwCfg *mastercfg.CfgNetworkState) string
- func PolicyAddRule(policy *contivModel.Policy, rule *contivModel.Rule) error
- func PolicyAttach(epg *contivModel.EndpointGroup, policy *contivModel.Policy) error
- func PolicyDelRule(policy *contivModel.Policy, rule *contivModel.Rule) error
- func PolicyDetach(epg *contivModel.EndpointGroup, policy *contivModel.Policy) error
- func ReleaseAddressHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
- func RestoreServiceProviderLBDb()
- func SetClusterMode(cm string) error
- func SvcProviderUpdate(serviceID string, isDelete bool) error
- func UpdateEndpointGroup(bandwidth, groupName, tenantName string, Dscp, burst int) error
- func UpdateEndpointHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
- func UpdateGlobal(stateDriver core.StateDriver, gc *intent.ConfigGlobal) error
- type AddressAllocRequest
- type AddressAllocResponse
- type AddressReleaseRequest
- type CreateEndpointRequest
- type CreateEndpointResponse
- type DeleteEndpointRequest
- type DeleteEndpointResponse
- type UpdateEndpointRequest
- type UpdateEndpointResponse
Constants ¶
const ( //GetVersionRESTEndpoint is the REST endpoint to get version info GetVersionRESTEndpoint = "version" // GetInfoRESTEndpoint is the REST endpoint to get netmaster info GetInfoRESTEndpoint = "info" //GetServiceRESTEndpoint is the REST endpoint to get service info of a service GetServiceRESTEndpoint = "service" //GetServicesRESTEndpoint is the REST endpoint to request info of all services GetServicesRESTEndpoint = "services" )
Variables ¶
var EpgPolicyExists = core.Errorf("Epg policy exists")
EpgPolicyExists is a well known exported error
Functions ¶
func AddBgp ¶
func AddBgp(stateDriver core.StateDriver, bgpCfg *intent.ConfigBgp) error
AddBgp adds to the etcd state
func AllocAddressHandler ¶
func AllocAddressHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
AllocAddressHandler allocates addresses
func CreateEndpoint ¶
func CreateEndpoint(stateDriver core.StateDriver, nwCfg *mastercfg.CfgNetworkState, epReq *CreateEndpointRequest) (*mastercfg.CfgEndpointState, error)
CreateEndpoint creates an endpoint
func CreateEndpointGroup ¶
CreateEndpointGroup handles creation of endpoint group
func CreateEndpointHandler ¶
func CreateEndpointHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
CreateEndpointHandler handles create endpoint requests
func CreateEndpoints ¶
func CreateEndpoints(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
CreateEndpoints creates the endpoints for a given tenant.
func CreateEpBindings ¶
CreateEpBindings binds an endpoint to a host by updating host-label info in driver's endpoint configuration.
func CreateGlobal ¶
func CreateGlobal(stateDriver core.StateDriver, gc *intent.ConfigGlobal) error
CreateGlobal sets the global state
func CreateNetwork ¶
func CreateNetwork(network intent.ConfigNetwork, stateDriver core.StateDriver, tenantName string) error
CreateNetwork creates a network from intent
func CreateNetworks ¶
func CreateNetworks(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
CreateNetworks creates the necessary virtual networks for the tenant provided by ConfigTenant.
func CreateServiceLB ¶
func CreateServiceLB(stateDriver core.StateDriver, serviceLbCfg *intent.ConfigServiceLB) error
CreateServiceLB adds to the etcd state
func CreateTenant ¶
func CreateTenant(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
CreateTenant sets the tenant's state according to the passed ConfigTenant.
func DeleteBgp ¶
func DeleteBgp(stateDriver core.StateDriver, hostname string) error
DeleteBgp deletes from etcd state
func DeleteEndpointGroup ¶
DeleteEndpointGroup handles endpoint group deletes
func DeleteEndpointHandler ¶
func DeleteEndpointHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
DeleteEndpointHandler handles delete endpoint requests
func DeleteEndpointID ¶
func DeleteEndpointID(stateDriver core.StateDriver, epID string) (*mastercfg.CfgEndpointState, error)
DeleteEndpointID deletes an endpoint by ID.
func DeleteEndpoints ¶
DeleteEndpoints deletes the endpoints on a give host
func DeleteGlobal ¶
func DeleteGlobal(stateDriver core.StateDriver) error
DeleteGlobal delete global state
func DeleteNetworkID ¶
func DeleteNetworkID(stateDriver core.StateDriver, netID string) error
DeleteNetworkID removes a network by ID.
func DeleteNetworks ¶
func DeleteNetworks(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
DeleteNetworks removes all the virtual networks for a given tenant.
func DeleteServiceLB ¶
func DeleteServiceLB(stateDriver core.StateDriver, serviceName string, tenantName string) error
DeleteServiceLB deletes from etcd state
func DeleteTenant ¶
func DeleteTenant(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
DeleteTenant deletes a tenant from the state store based on its ConfigTenant.
func GetClusterMode ¶
func GetClusterMode() string
GetClusterMode gets the cluster mode of the contiv plugin
func GetServiceID ¶
GetServiceID returns service id for etcd lookup
func IsAciConfigured ¶
IsAciConfigured returns true if aci is configured on netmaster.
func ListAllocatedIPs ¶
func ListAllocatedIPs(nwCfg *mastercfg.CfgNetworkState) string
ListAllocatedIPs returns a string of allocated IPs in a network
func ListAvailableIPs ¶
func ListAvailableIPs(nwCfg *mastercfg.CfgNetworkState) string
ListAvailableIPs returns a string of available IPs in a network
func PolicyAddRule ¶
func PolicyAddRule(policy *contivModel.Policy, rule *contivModel.Rule) error
PolicyAddRule adds a rule to existing policy
func PolicyAttach ¶
func PolicyAttach(epg *contivModel.EndpointGroup, policy *contivModel.Policy) error
PolicyAttach attaches a policy to an endpoint and adds associated rules to policyDB
func PolicyDelRule ¶
func PolicyDelRule(policy *contivModel.Policy, rule *contivModel.Rule) error
PolicyDelRule removes a rule from existing policy
func PolicyDetach ¶
func PolicyDetach(epg *contivModel.EndpointGroup, policy *contivModel.Policy) error
PolicyDetach detaches policy from an endpoint and removes associated rules from policyDB
func ReleaseAddressHandler ¶
func ReleaseAddressHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
ReleaseAddressHandler releases addresses
func RestoreServiceProviderLBDb ¶
func RestoreServiceProviderLBDb()
RestoreServiceProviderLBDb restores provider and servicelb db
func SetClusterMode ¶
SetClusterMode sets the cluster mode for the contiv plugin
func SvcProviderUpdate ¶
SvcProviderUpdate propagates service provider updates to netplugins
func UpdateEndpointGroup ¶
UpdateEndpointGroup updates the endpointgroups
func UpdateEndpointHandler ¶
func UpdateEndpointHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
UpdateEndpointHandler handles update event from netplugin
func UpdateGlobal ¶
func UpdateGlobal(stateDriver core.StateDriver, gc *intent.ConfigGlobal) error
UpdateGlobal updates the global state
Types ¶
type AddressAllocRequest ¶
type AddressAllocRequest struct { NetworkID string // Unique identifier for the network AddressPool string // Address pool from which to allocate the address PreferredIPv4Address string // Preferred address }
AddressAllocRequest is the address request from netplugin
type AddressAllocResponse ¶
type AddressAllocResponse struct { NetworkID string // Unique identifier for the network IPv4Address string // Allocated address }
AddressAllocResponse is the response from netmaster
type AddressReleaseRequest ¶
type AddressReleaseRequest struct { NetworkID string // Unique identifier for the network IPv4Address string // Allocated address }
AddressReleaseRequest is the release request from netplugin
type CreateEndpointRequest ¶
type CreateEndpointRequest struct { TenantName string // tenant name NetworkName string // network name ServiceName string // service name EndpointID string // Unique identifier for the endpoint EPCommonName string // Common name for the endpoint ConfigEP intent.ConfigEP // Endpoint configuration }
CreateEndpointRequest has the endpoint create request from netplugin
type CreateEndpointResponse ¶
type CreateEndpointResponse struct {
EndpointConfig mastercfg.CfgEndpointState // Endpoint config
}
CreateEndpointResponse has the endpoint create response from netmaster
type DeleteEndpointRequest ¶
type DeleteEndpointRequest struct { TenantName string // tenant name NetworkName string // network name ServiceName string // service name EndpointID string // Unique identifier for the endpoint IPv4Address string // Allocated IPv4 address for the endpoint }
DeleteEndpointRequest is the delete endpoint request from netplugin
type DeleteEndpointResponse ¶
type DeleteEndpointResponse struct {
EndpointConfig mastercfg.CfgEndpointState // Endpoint config
}
DeleteEndpointResponse is the delete endpoint response from netmaster
type UpdateEndpointRequest ¶
type UpdateEndpointRequest struct { IPAddress string // provider IP ContainerID string // container id Labels map[string]string // lables Tenant string Network string Event string EndpointID string EPCommonName string // Common name for the endpoint }
UpdateEndpointRequest has the update endpoint request from netplugin
type UpdateEndpointResponse ¶
type UpdateEndpointResponse struct {
IPAddress string // provider IP
}
UpdateEndpointResponse is service provider update request from netplugin