Documentation ¶
Overview ¶
*
- File : ovs.go
- Author : Iman Tabrizian <iman.tabrizian@gmail.com>
- Date : 04.04.2019
- Last Modified Date: 15.04.2019
- Last Modified By : Iman Tabrizian <iman.tabrizian@gmail.com>
*
- File : ryu.go
- Author : Iman Tabrizian <iman.tabrizian@gmail.com>
- Date : 14.04.2019
- Last Modified Date: 22.05.2019
- Last Modified By : Iman Tabrizian <iman.tabrizian@gmail.com>
Index ¶
- func AuthRequest(verb string, url string, body string, authToken string) []byte
- func InstallOVS(vm models.VM)
- func PublicKeyFile(file string) ssh.AuthMethod
- func RunCommand(vm models.VM, cmd string) ([]byte, []byte)
- func RunCommandFromOverlay(vm models.VM, cmd string, overlayIP string) ([]byte, []byte)
- func RunCommandOverSSH(ip string, cmd string) ([]byte, []byte)
- func SetController(vm models.VM, ctrlEndpoint string)
- func SetOverlayInterface(vm models.VM, hostOverlayIP string)
- type ConsulClient
- type Match
- type OpenStackClient
- func (osClient *OpenStackClient) CreateServer(name string, vmConfiguration models.VMConfiguration) *models.VM
- func (osClient *OpenStackClient) GetAuthToken() string
- func (osClient *OpenStackClient) GetFlavorID(flavor string) string
- func (osClient *OpenStackClient) GetImageID(image string) string
- func (osClient *OpenStackClient) GetNetworkID(network string) string
- func (osClient *OpenStackClient) GetNovaURL() string
- func (osClient *OpenStackClient) GetSecgroupID(secgroup string) string
- type PortAction
- type Rule
- type RyuClient
- func (ryuClient *RyuClient) DeleteAll() error
- func (ryuClient *RyuClient) DeleteFlow(rule Rule) ([]byte, error)
- func (ryuClient *RyuClient) FindShortestPath(src string, dst string) []string
- func (ryuClient *RyuClient) GetSwitches() ([]RyuSwitch, error)
- func (ryuClient *RyuClient) InstallFlow(rule Rule) ([]byte, error)
- type RyuPort
- type RyuSwitch
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallOVS ¶
func PublicKeyFile ¶
func PublicKeyFile(file string) ssh.AuthMethod
func RunCommandFromOverlay ¶
func SetController ¶
func SetOverlayInterface ¶
Types ¶
type ConsulClient ¶
type ConsulClient struct {
URL string
}
func NewConsulClient ¶
func NewConsulClient(url string) (*ConsulClient, error)
func (*ConsulClient) DeleteService ¶
func (consulClient *ConsulClient) DeleteService(service *Service) ([]byte, error)
func (*ConsulClient) RegisterService ¶
func (consulClient *ConsulClient) RegisterService(service *Service) ([]byte, error)
type Match ¶
type Match struct { DLSrc string `json:"dl_src,omitempty"` DLDst string `json:"dl_dst,omitempty"` InPort int `json:"in_port,omitempty"` DLType int `json:"dl_type,omitempty"` NWSrc string `json:"nw_src,omitempty"` NWDst string `json:"nw_dst,omitempty"` NWProto int `json:"nw_proto,omitempty"` TPDst int `json:"tp_dst,omitempty"` }
type OpenStackClient ¶
type OpenStackClient struct { AuthToken string Auth models.AuthConfiguration NovaURL string NetworkURL string }
func NewOpenStackClient ¶
func NewOpenStackClient(auth models.AuthConfiguration) (*OpenStackClient, error)
func (*OpenStackClient) CreateServer ¶
func (osClient *OpenStackClient) CreateServer(name string, vmConfiguration models.VMConfiguration) *models.VM
func (*OpenStackClient) GetAuthToken ¶
func (osClient *OpenStackClient) GetAuthToken() string
func (*OpenStackClient) GetFlavorID ¶
func (osClient *OpenStackClient) GetFlavorID(flavor string) string
func (*OpenStackClient) GetImageID ¶
func (osClient *OpenStackClient) GetImageID(image string) string
func (*OpenStackClient) GetNetworkID ¶
func (osClient *OpenStackClient) GetNetworkID(network string) string
func (*OpenStackClient) GetNovaURL ¶
func (osClient *OpenStackClient) GetNovaURL() string
func (*OpenStackClient) GetSecgroupID ¶
func (osClient *OpenStackClient) GetSecgroupID(secgroup string) string
type PortAction ¶
type Rule ¶
type Rule struct { Matching Match `json:"match"` Action []PortAction `json:"actions"` Dpid int `json:"dpid"` Priority int `json:"priority,omitempty"` }
type RyuClient ¶
type RyuClient struct {
URL string
}
func NewRyuClient ¶
func (*RyuClient) FindShortestPath ¶
func (*RyuClient) GetSwitches ¶
Returns the list of all of the switches
Click to show internal directories.
Click to hide internal directories.