Documentation ¶
Index ¶
- Constants
- func CreateEndpoints(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func CreateEpBindings(epBindings *[]intent.ConfigEP) error
- func CreateHost(stateDriver core.StateDriver, host *intent.ConfigHost) 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 DeleteEndpointID(stateDriver core.StateDriver, epID string) error
- func DeleteEndpoints(stateDriver core.StateDriver, tenant *intent.ConfigTenant) error
- func DeleteHost(stateDriver core.StateDriver, host *intent.ConfigHost) error
- func DeleteHostID(stateDriver core.StateDriver, hostName string) 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 ProcessAdditions(allCfg *intent.Config) (err error)
- func ProcessDeletions(allCfg *intent.Config) (err error)
- type HostConfig
- type NwConfig
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 ¶
This section is empty.
Functions ¶
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 CreateHost ¶
func CreateHost(stateDriver core.StateDriver, host *intent.ConfigHost) error
CreateHost creates a host in the state configuration.
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 DeleteEndpointID ¶
func DeleteEndpointID(stateDriver core.StateDriver, epID string) 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 DeleteHost ¶
func DeleteHost(stateDriver core.StateDriver, host *intent.ConfigHost) error
DeleteHost deletes a host by its ConfigHost state
func DeleteHostID ¶
func DeleteHostID(stateDriver core.StateDriver, hostName string) error
DeleteHostID deletes a host by ID.
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 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.
Types ¶
type HostConfig ¶
type HostConfig struct { core.CommonState Name string `json:"name"` Intf string `json:"intf"` VtepIP string `json:"vtepIp"` NetID string `json:"netId"` }
HostConfig is the state carried for network + host maps.
func (*HostConfig) Read ¶
func (s *HostConfig) Read(hostname string) error
Read the host state from the state system, provided a hostname.
func (*HostConfig) ReadAll ¶
func (s *HostConfig) ReadAll() ([]core.State, error)
ReadAll implements reading the state for all hosts.
func (*HostConfig) Write ¶
func (s *HostConfig) Write() error
Write the master host configuration to the state system.
type NwConfig ¶
type NwConfig struct { core.CommonState Tenant string `json:"tenant"` PktTagType string `json:"pktTagType"` PktTag string `json:"pktTag"` SubnetIP string `json:"subnetIP"` SubnetLen uint `json:"subnetLen"` DefaultGw string `json:"defaultGw"` }
NwConfig is the network configuration for a given tenant+network