agent

package
v0.0.0-...-814f547 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2016 Juniper Networks, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

***************************************************************************

  • Connection handling *************************************************************************** struct to hold data for a connection to VRouter Agent

func Init

func Init(vm, dir, server string, port int) (*Connection, error)

func (*Connection) AddVm

func (conn *Connection) AddVm(podName, nameSpace, containerId, hostIfName,
	containerIfName string) (error, error)

Process add of a VM. Writes config file and send message to agent

func (*Connection) Close

func (conn *Connection) Close() error

***************************************************************************

  • Connection handlers ***************************************************************************

func (*Connection) DelVm

func (conn *Connection) DelVm(podName string) error

Process delete VM. The method ignores intermediate errors and does best * effort cleanup

func (*Connection) GetVmiInfo

func (conn *Connection) GetVmiInfo(instanceId, ifName string,
	delay string, count int) (*Result, error)

type Result

type Result struct {
	Vm   string `json:"vm"`
	Ip   string `json:"ip-address"`
	Plen int    `json:"plen"`
	Gw   string `json:"gateway"`
	Dns  string `json:"dns-server"`
	Mac  string `json:"mac-address"`
}

***************************************************************************

  • POLL message handling ***************************************************************************

Jump to

Keyboard shortcuts

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