VMware vSphere Integrated Containers provider (#206)
* Add Virtual Kubelet provider for VIC Initial virtual kubelet provider for VMware VIC. This provider currently handles creating and starting of a pod VM via the VIC portlayer and persona server. Image store handling via the VIC persona server. This provider currently requires the feature/wolfpack branch of VIC. * Added pod stop and delete. Also added node capacity. Added the ability to stop and delete pod VMs via VIC. Also retrieve node capacity information from the VCH. * Cleanup and readme file Some file clean up and added a Readme.md markdown file for the VIC provider. * Cleaned up errors, added function comments, moved operation code 1. Cleaned up error handling. Set standard for creating errors. 2. Added method prototype comments for all interface functions. 3. Moved PodCreator, PodStarter, PodStopper, and PodDeleter to a new folder. * Add mocking code and unit tests for podcache, podcreator, and podstarter Used the unit test framework used in VIC to handle assertions in the provider's unit test. Mocking code generated using OSS project mockery, which is compatible with the testify assertion framework. * Vendored packages for the VIC provider Requires feature/wolfpack branch of VIC and a few specific commit sha of projects used within VIC. * Implementation of POD Stopper and Deleter unit tests (#4) * Updated files for initial PR
This commit is contained in:
164
vendor/github.com/docker/libnetwork/drivers/remote/api/api.go
generated
vendored
Normal file
164
vendor/github.com/docker/libnetwork/drivers/remote/api/api.go
generated
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
Package api represents all requests and responses suitable for conversation
|
||||
with a remote driver.
|
||||
*/
|
||||
package api
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"github.com/docker/libnetwork/driverapi"
|
||||
)
|
||||
|
||||
// Response is the basic response structure used in all responses.
|
||||
type Response struct {
|
||||
Err string
|
||||
}
|
||||
|
||||
// GetError returns the error from the response, if any.
|
||||
func (r *Response) GetError() string {
|
||||
return r.Err
|
||||
}
|
||||
|
||||
// GetCapabilityResponse is the response of GetCapability request
|
||||
type GetCapabilityResponse struct {
|
||||
Response
|
||||
Scope string
|
||||
}
|
||||
|
||||
// CreateNetworkRequest requests a new network.
|
||||
type CreateNetworkRequest struct {
|
||||
// A network ID that remote plugins are expected to store for future
|
||||
// reference.
|
||||
NetworkID string
|
||||
|
||||
// A free form map->object interface for communication of options.
|
||||
Options map[string]interface{}
|
||||
|
||||
// IPAMData contains the address pool information for this network
|
||||
IPv4Data, IPv6Data []driverapi.IPAMData
|
||||
}
|
||||
|
||||
// CreateNetworkResponse is the response to the CreateNetworkRequest.
|
||||
type CreateNetworkResponse struct {
|
||||
Response
|
||||
}
|
||||
|
||||
// DeleteNetworkRequest is the request to delete an existing network.
|
||||
type DeleteNetworkRequest struct {
|
||||
// The ID of the network to delete.
|
||||
NetworkID string
|
||||
}
|
||||
|
||||
// DeleteNetworkResponse is the response to a request for deleting a network.
|
||||
type DeleteNetworkResponse struct {
|
||||
Response
|
||||
}
|
||||
|
||||
// CreateEndpointRequest is the request to create an endpoint within a network.
|
||||
type CreateEndpointRequest struct {
|
||||
// Provided at create time, this will be the network id referenced.
|
||||
NetworkID string
|
||||
// The ID of the endpoint for later reference.
|
||||
EndpointID string
|
||||
Interface *EndpointInterface
|
||||
Options map[string]interface{}
|
||||
}
|
||||
|
||||
// EndpointInterface represents an interface endpoint.
|
||||
type EndpointInterface struct {
|
||||
Address string
|
||||
AddressIPv6 string
|
||||
MacAddress string
|
||||
}
|
||||
|
||||
// CreateEndpointResponse is the response to the CreateEndpoint action.
|
||||
type CreateEndpointResponse struct {
|
||||
Response
|
||||
Interface *EndpointInterface
|
||||
}
|
||||
|
||||
// Interface is the representation of a linux interface.
|
||||
type Interface struct {
|
||||
Address *net.IPNet
|
||||
AddressIPv6 *net.IPNet
|
||||
MacAddress net.HardwareAddr
|
||||
}
|
||||
|
||||
// DeleteEndpointRequest describes the API for deleting an endpoint.
|
||||
type DeleteEndpointRequest struct {
|
||||
NetworkID string
|
||||
EndpointID string
|
||||
}
|
||||
|
||||
// DeleteEndpointResponse is the response to the DeleteEndpoint action.
|
||||
type DeleteEndpointResponse struct {
|
||||
Response
|
||||
}
|
||||
|
||||
// EndpointInfoRequest retrieves information about the endpoint from the network driver.
|
||||
type EndpointInfoRequest struct {
|
||||
NetworkID string
|
||||
EndpointID string
|
||||
}
|
||||
|
||||
// EndpointInfoResponse is the response to an EndpointInfoRequest.
|
||||
type EndpointInfoResponse struct {
|
||||
Response
|
||||
Value map[string]interface{}
|
||||
}
|
||||
|
||||
// JoinRequest describes the API for joining an endpoint to a sandbox.
|
||||
type JoinRequest struct {
|
||||
NetworkID string
|
||||
EndpointID string
|
||||
SandboxKey string
|
||||
Options map[string]interface{}
|
||||
}
|
||||
|
||||
// InterfaceName is the struct represetation of a pair of devices with source
|
||||
// and destination, for the purposes of putting an endpoint into a container.
|
||||
type InterfaceName struct {
|
||||
SrcName string
|
||||
DstName string
|
||||
DstPrefix string
|
||||
}
|
||||
|
||||
// StaticRoute is the plain JSON representation of a static route.
|
||||
type StaticRoute struct {
|
||||
Destination string
|
||||
RouteType int
|
||||
NextHop string
|
||||
}
|
||||
|
||||
// JoinResponse is the response to a JoinRequest.
|
||||
type JoinResponse struct {
|
||||
Response
|
||||
InterfaceName *InterfaceName
|
||||
Gateway string
|
||||
GatewayIPv6 string
|
||||
StaticRoutes []StaticRoute
|
||||
DisableGatewayService bool
|
||||
}
|
||||
|
||||
// LeaveRequest describes the API for detaching an endpoint from a sandbox.
|
||||
type LeaveRequest struct {
|
||||
NetworkID string
|
||||
EndpointID string
|
||||
}
|
||||
|
||||
// LeaveResponse is the answer to LeaveRequest.
|
||||
type LeaveResponse struct {
|
||||
Response
|
||||
}
|
||||
|
||||
// DiscoveryNotification represents a discovery notification
|
||||
type DiscoveryNotification struct {
|
||||
DiscoveryType driverapi.DiscoveryType
|
||||
DiscoveryData interface{}
|
||||
}
|
||||
|
||||
// DiscoveryResponse is used by libnetwork to log any plugin error processing the discovery notifications
|
||||
type DiscoveryResponse struct {
|
||||
Response
|
||||
}
|
||||
Reference in New Issue
Block a user