Documentation ¶
Index ¶
- Constants
- Variables
- 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 string, epgID int) 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 CreateTenant(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func DeleteDelta(allCfg *intent.Config) error
- func DeleteEndpointGroup(epgID int) 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(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func DeleteNetworkID(stateDriver core.StateDriver, netID string) error
- func DeleteNetworks(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func DeleteTenant(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func DeleteTenantID(stateDriver core.StateDriver, tenantID string) error
- func IsAciConfigured() (res bool, err error)
- 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 ProcessAdditions(allCfg *intent.Config) (err error)
- func ProcessDeletions(allCfg *intent.Config) (err error)
- func ReleaseAddressHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
- type AddressAllocRequest
- type AddressAllocResponse
- type AddressReleaseRequest
- type CreateEndpointRequest
- type CreateEndpointResponse
- type DeleteEndpointRequest
- type DeleteEndpointResponse
Constants ¶
const ( // DaemonURL is default url used by netmaster to listen for http requests DaemonURL = "localhost:9999" //DesiredConfigRESTEndpoint is the REST endpoint to post desired configuration DesiredConfigRESTEndpoint = "desired-config" //AddConfigRESTEndpoint is the REST endpoint to post configuration additions AddConfigRESTEndpoint = "add-config" // DelConfigRESTEndpoint is the REST endpoint to post configuration deletions DelConfigRESTEndpoint = "del-config" //HostBindingConfigRESTEndpoint is the REST endpoint to post host binding configuration HostBindingConfigRESTEndpoint = "host-bindings-config" //GetEndpointRESTEndpoint is the REST endpoint to request info of an endpoint GetEndpointRESTEndpoint = "endpoint" //GetEndpointsRESTEndpoint is the REST endpoint to request info of all endpoints GetEndpointsRESTEndpoint = "endpoints" //GetNetworkRESTEndpoint is the REST endpoint to request info of a network GetNetworkRESTEndpoint = "network" //GetNetworksRESTEndpoint is the REST endpoint to request info of all networks GetNetworksRESTEndpoint = "networks" )
Variables ¶
var EpgPolicyExists = core.Errorf("Epg policy exists")
EpgPolicyExists is a well known exported error
Functions ¶
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, ep *intent.ConfigEP) (*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 CreateTenant ¶
func CreateTenant(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
CreateTenant sets the tenant's state according to the passed ConfigTenant.
func DeleteDelta ¶
DeleteDelta deletes any existing configuration from netmaster's statestore that is not present in the configuration passed. This may result in generating Delete triggers for the netplugin
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 ¶
func DeleteEndpoints(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
DeleteEndpoints deletes the endpoints for the tenant.
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 DeleteTenant ¶
func DeleteTenant(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
DeleteTenant deletes a tenant from the state store based on its ConfigTenant.
func DeleteTenantID ¶
func DeleteTenantID(stateDriver core.StateDriver, tenantID string) error
DeleteTenantID deletes a tenant from the state store, by ID.
func IsAciConfigured ¶
IsAciConfigured returns true if aci is configured on netmaster.
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 ProcessAdditions ¶
ProcessAdditions adds the configuration passed to netmaster's statestore. This may result in generating Add/Create triggers for the netplugin.
func ProcessDeletions ¶
ProcessDeletions deletes the configuration passed from netmaster's statestore. This may result in generating Delete triggers for the netplugin.
func ReleaseAddressHandler ¶
func ReleaseAddressHandler(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)
ReleaseAddressHandler releases addresses
Types ¶
type AddressAllocRequest ¶
type AddressAllocRequest struct { NetworkID string // Unique identifier for the network 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 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