master

package
v0.0.0-12-25-2015.10-1... Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2015 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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

func CreateEndpointGroup(tenantName, networkName, groupName string, epgID int) error

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

func CreateEpBindings(epBindings *[]intent.ConfigEP) error

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

func DeleteDelta(allCfg *intent.Config) error

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

func DeleteEndpointGroup(epgID int) error

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

func IsAciConfigured() (res bool, err error)

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

func ProcessAdditions(allCfg *intent.Config) (err error)

ProcessAdditions adds the configuration passed to netmaster's statestore. This may result in generating Add/Create triggers for the netplugin.

func ProcessDeletions

func ProcessDeletions(allCfg *intent.Config) (err error)

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

Jump to

Keyboard shortcuts

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