client

package
v0.0.0-...-17ac0a5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

package client provides contiv REST client implementation.

Concepts and Terminology:

Tenant : Tenants provides namespace isolation for networks. It is the toplevel object where networks and policies are defiend. A tenant can have many networks, each with its own subnet address, among other information. A user can create networks with arbtrary subnet addresses within a tenant namespace, possibly reusing subnet IP addresses in other tenants. This provides complete freedom to a tenant user to specify the network names and their subnets within a tenant.

Network: Network is an IPv4 or IPv6 subnet that may be provided with a default gateway. For example, a network can map to a subnet 10.1.1.0/24 that has a default gateway of 10.1.1.1.

Policies: A policy describes an operational behavior on a group of containers. The operational behavior can be enforcement, allocation, prioritation, traffic redirection, stats collection, or other action on the group on which the policy is applied. For example, an inbound security policy on a database tier can specify the allowed ports on the containers belonging to the group.

EndpointGroups: Endpoint group (or an application group) identifies a policy domain for a container or a pod. The grouping is an arbitrary collection of containers that share a specific application domain, for example all production,frontend containers, or backup,long-running containers. This association is often done by specifying label in kubernetes pod spec

contiv object model is shown here https://github.com/contiv/modelgen/blob/master/docs/contivModel.png

Example:

package main

import (

"log"
"github.com/contiv/contivModel/client"

)

func main() {
   cl, err := client.NewContivClient("localhost:9999")
   if err != nil {
       log.Fatal(err)
   }

   // Define a policy
   policy := client.Policy{
       TenantName: "tenant1",
       PolicyName: "policy",
   }

   // Create policy
   err = cl.PostPolicy(policy)
   if err != nil {
       log.Errorf("Policy Creation failed. Err: %v", err)
   }
}

Index

Constants

View Source
const LoginPath = "/api/v1/auth_proxy/login/"

LoginPath is the path of auth_proxy's login endpoint

Variables

This section is empty.

Functions

This section is empty.

Types

type AciGw

type AciGw struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	EnforcePolicies     string `json:"enforcePolicies,omitempty"`     // Enforce security policy
	IncludeCommonTenant string `json:"includeCommonTenant,omitempty"` // Include common tenant when searching for objects
	Name                string `json:"name,omitempty"`                // name of this block(must be 'aciGw')
	NodeBindings        string `json:"nodeBindings,omitempty"`        // List of ACI complete nodes to be bound
	PathBindings        string `json:"pathBindings,omitempty"`        // List of ACI fabric ports connected to cluster
	PhysicalDomain      string `json:"physicalDomain,omitempty"`      // Name of the physical domain

}

AciGw object

type AciGwInspect

type AciGwInspect struct {
	Config AciGw

	Oper AciGwOper
}

AciGwInspect inspect information

type AciGwOper

type AciGwOper struct {
	NumAppProfiles int `json:"numAppProfiles,omitempty"` //

}

AciGwOper runtime operations

type AppProfile

type AppProfile struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	AppProfileName string   `json:"appProfileName,omitempty"` // Application Profile Name
	EndpointGroups []string `json:"endpointGroups,omitempty"`
	TenantName     string   `json:"tenantName,omitempty"` // Tenant Name

	// add link-sets and links
	LinkSets AppProfileLinkSets `json:"link-sets,omitempty"`
	Links    AppProfileLinks    `json:"links,omitempty"`
}

AppProfile object

type AppProfileInspect

type AppProfileInspect struct {
	Config AppProfile
}

AppProfileInspect inspect information

type AppProfileLinkSets

type AppProfileLinkSets struct {
	EndpointGroups map[string]Link `json:"EndpointGroups,omitempty"`
}

AppProfileLinkSets list of internal links

type AppProfileLinks struct {
	Tenant Link `json:"Tenant,omitempty"`
}

AppProfileLinks internal links to other object

type Bgp

type Bgp struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	As         string `json:"as,omitempty"`          // AS id
	Hostname   string `json:"hostname,omitempty"`    // host name
	Neighbor   string `json:"neighbor,omitempty"`    // Bgp  neighbor
	NeighborAs string `json:"neighbor-as,omitempty"` // AS id
	Routerip   string `json:"routerip,omitempty"`    // Bgp router intf ip

}

Bgp object

type BgpInspect

type BgpInspect struct {
	Config Bgp

	Oper BgpOper
}

BgpInspect inspect information

type BgpOper

type BgpOper struct {
	AdminStatus    string   `json:"adminStatus,omitempty"`    // admin status
	NeighborStatus string   `json:"neighborStatus,omitempty"` // neighbor status
	NumRoutes      int      `json:"numRoutes,omitempty"`      // number of routes
	Routes         []string `json:"routes,omitempty"`
}

BgpOper runtime operations

type ContivClient

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

ContivClient has the contiv model client instance

func NewContivClient

func NewContivClient(baseURL string) (*ContivClient, error)

NewContivClient creates a new client instance

func (*ContivClient) AciGwDelete

func (c *ContivClient) AciGwDelete(name string) error

AciGwDelete deletes the aciGw object

func (*ContivClient) AciGwGet

func (c *ContivClient) AciGwGet(name string) (*AciGw, error)

AciGwGet gets the aciGw object

func (*ContivClient) AciGwInspect

func (c *ContivClient) AciGwInspect(name string) (*AciGwInspect, error)

AciGwInspect gets the aciGwInspect object

func (*ContivClient) AciGwList

func (c *ContivClient) AciGwList() (*[]*AciGw, error)

AciGwList lists all aciGw objects

func (*ContivClient) AciGwPost

func (c *ContivClient) AciGwPost(obj *AciGw) error

AciGwPost posts the aciGw object

func (*ContivClient) AppProfileDelete

func (c *ContivClient) AppProfileDelete(tenantName string, appProfileName string) error

AppProfileDelete deletes the appProfile object

func (*ContivClient) AppProfileGet

func (c *ContivClient) AppProfileGet(tenantName string, appProfileName string) (*AppProfile, error)

AppProfileGet gets the appProfile object

func (*ContivClient) AppProfileInspect

func (c *ContivClient) AppProfileInspect(tenantName string, appProfileName string) (*AppProfileInspect, error)

AppProfileInspect gets the appProfileInspect object

func (*ContivClient) AppProfileList

func (c *ContivClient) AppProfileList() (*[]*AppProfile, error)

AppProfileList lists all appProfile objects

func (*ContivClient) AppProfilePost

func (c *ContivClient) AppProfilePost(obj *AppProfile) error

AppProfilePost posts the appProfile object

func (*ContivClient) BgpDelete

func (c *ContivClient) BgpDelete(hostname string) error

BgpDelete deletes the Bgp object

func (*ContivClient) BgpGet

func (c *ContivClient) BgpGet(hostname string) (*Bgp, error)

BgpGet gets the Bgp object

func (*ContivClient) BgpInspect

func (c *ContivClient) BgpInspect(hostname string) (*BgpInspect, error)

BgpInspect gets the BgpInspect object

func (*ContivClient) BgpList

func (c *ContivClient) BgpList() (*[]*Bgp, error)

BgpList lists all Bgp objects

func (*ContivClient) BgpPost

func (c *ContivClient) BgpPost(obj *Bgp) error

BgpPost posts the Bgp object

func (*ContivClient) EndpointGroupDelete

func (c *ContivClient) EndpointGroupDelete(tenantName string, groupName string) error

EndpointGroupDelete deletes the endpointGroup object

func (*ContivClient) EndpointGroupGet

func (c *ContivClient) EndpointGroupGet(tenantName string, groupName string) (*EndpointGroup, error)

EndpointGroupGet gets the endpointGroup object

func (*ContivClient) EndpointGroupInspect

func (c *ContivClient) EndpointGroupInspect(tenantName string, groupName string) (*EndpointGroupInspect, error)

EndpointGroupInspect gets the endpointGroupInspect object

func (*ContivClient) EndpointGroupList

func (c *ContivClient) EndpointGroupList() (*[]*EndpointGroup, error)

EndpointGroupList lists all endpointGroup objects

func (*ContivClient) EndpointGroupPost

func (c *ContivClient) EndpointGroupPost(obj *EndpointGroup) error

EndpointGroupPost posts the endpointGroup object

func (*ContivClient) EndpointInspect

func (c *ContivClient) EndpointInspect(endpointID string) (*EndpointInspect, error)

EndpointInspect gets the endpointInspect object

func (*ContivClient) ExtContractsGroupDelete

func (c *ContivClient) ExtContractsGroupDelete(tenantName string, contractsGroupName string) error

ExtContractsGroupDelete deletes the extContractsGroup object

func (*ContivClient) ExtContractsGroupGet

func (c *ContivClient) ExtContractsGroupGet(tenantName string, contractsGroupName string) (*ExtContractsGroup, error)

ExtContractsGroupGet gets the extContractsGroup object

func (*ContivClient) ExtContractsGroupInspect

func (c *ContivClient) ExtContractsGroupInspect(tenantName string, contractsGroupName string) (*ExtContractsGroupInspect, error)

ExtContractsGroupInspect gets the extContractsGroupInspect object

func (*ContivClient) ExtContractsGroupList

func (c *ContivClient) ExtContractsGroupList() (*[]*ExtContractsGroup, error)

ExtContractsGroupList lists all extContractsGroup objects

func (*ContivClient) ExtContractsGroupPost

func (c *ContivClient) ExtContractsGroupPost(obj *ExtContractsGroup) error

ExtContractsGroupPost posts the extContractsGroup object

func (*ContivClient) GlobalDelete

func (c *ContivClient) GlobalDelete(name string) error

GlobalDelete deletes the global object

func (*ContivClient) GlobalGet

func (c *ContivClient) GlobalGet(name string) (*Global, error)

GlobalGet gets the global object

func (*ContivClient) GlobalInspect

func (c *ContivClient) GlobalInspect(name string) (*GlobalInspect, error)

GlobalInspect gets the globalInspect object

func (*ContivClient) GlobalList

func (c *ContivClient) GlobalList() (*[]*Global, error)

GlobalList lists all global objects

func (*ContivClient) GlobalPost

func (c *ContivClient) GlobalPost(obj *Global) error

GlobalPost posts the global object

func (*ContivClient) Login

func (c *ContivClient) Login(username, password string) (*http.Response, []byte, error)

Login performs a login to auth_proxy and returns the response and body

func (*ContivClient) NetprofileDelete

func (c *ContivClient) NetprofileDelete(tenantName string, profileName string) error

NetprofileDelete deletes the netprofile object

func (*ContivClient) NetprofileGet

func (c *ContivClient) NetprofileGet(tenantName string, profileName string) (*Netprofile, error)

NetprofileGet gets the netprofile object

func (*ContivClient) NetprofileInspect

func (c *ContivClient) NetprofileInspect(tenantName string, profileName string) (*NetprofileInspect, error)

NetprofileInspect gets the netprofileInspect object

func (*ContivClient) NetprofileList

func (c *ContivClient) NetprofileList() (*[]*Netprofile, error)

NetprofileList lists all netprofile objects

func (*ContivClient) NetprofilePost

func (c *ContivClient) NetprofilePost(obj *Netprofile) error

NetprofilePost posts the netprofile object

func (*ContivClient) NetworkDelete

func (c *ContivClient) NetworkDelete(tenantName string, networkName string) error

NetworkDelete deletes the network object

func (*ContivClient) NetworkGet

func (c *ContivClient) NetworkGet(tenantName string, networkName string) (*Network, error)

NetworkGet gets the network object

func (*ContivClient) NetworkInspect

func (c *ContivClient) NetworkInspect(tenantName string, networkName string) (*NetworkInspect, error)

NetworkInspect gets the networkInspect object

func (*ContivClient) NetworkList

func (c *ContivClient) NetworkList() (*[]*Network, error)

NetworkList lists all network objects

func (*ContivClient) NetworkPost

func (c *ContivClient) NetworkPost(obj *Network) error

NetworkPost posts the network object

func (*ContivClient) PolicyDelete

func (c *ContivClient) PolicyDelete(tenantName string, policyName string) error

PolicyDelete deletes the policy object

func (*ContivClient) PolicyGet

func (c *ContivClient) PolicyGet(tenantName string, policyName string) (*Policy, error)

PolicyGet gets the policy object

func (*ContivClient) PolicyInspect

func (c *ContivClient) PolicyInspect(tenantName string, policyName string) (*PolicyInspect, error)

PolicyInspect gets the policyInspect object

func (*ContivClient) PolicyList

func (c *ContivClient) PolicyList() (*[]*Policy, error)

PolicyList lists all policy objects

func (*ContivClient) PolicyPost

func (c *ContivClient) PolicyPost(obj *Policy) error

PolicyPost posts the policy object

func (*ContivClient) RuleDelete

func (c *ContivClient) RuleDelete(tenantName string, policyName string, ruleId string) error

RuleDelete deletes the rule object

func (*ContivClient) RuleGet

func (c *ContivClient) RuleGet(tenantName string, policyName string, ruleId string) (*Rule, error)

RuleGet gets the rule object

func (*ContivClient) RuleInspect

func (c *ContivClient) RuleInspect(tenantName string, policyName string, ruleId string) (*RuleInspect, error)

RuleInspect gets the ruleInspect object

func (*ContivClient) RuleList

func (c *ContivClient) RuleList() (*[]*Rule, error)

RuleList lists all rule objects

func (*ContivClient) RulePost

func (c *ContivClient) RulePost(obj *Rule) error

RulePost posts the rule object

func (*ContivClient) ServiceLBDelete

func (c *ContivClient) ServiceLBDelete(tenantName string, serviceName string) error

ServiceLBDelete deletes the serviceLB object

func (*ContivClient) ServiceLBGet

func (c *ContivClient) ServiceLBGet(tenantName string, serviceName string) (*ServiceLB, error)

ServiceLBGet gets the serviceLB object

func (*ContivClient) ServiceLBInspect

func (c *ContivClient) ServiceLBInspect(tenantName string, serviceName string) (*ServiceLBInspect, error)

ServiceLBInspect gets the serviceLBInspect object

func (*ContivClient) ServiceLBList

func (c *ContivClient) ServiceLBList() (*[]*ServiceLB, error)

ServiceLBList lists all serviceLB objects

func (*ContivClient) ServiceLBPost

func (c *ContivClient) ServiceLBPost(obj *ServiceLB) error

ServiceLBPost posts the serviceLB object

func (*ContivClient) SetAuthToken

func (c *ContivClient) SetAuthToken(token string) error

SetAuthToken sets the token used to authenticate with auth_proxy

func (*ContivClient) SetHTTPClient

func (c *ContivClient) SetHTTPClient(newClient *http.Client) error

SetHTTPClient replaces the internal *http.Client with a custom http client. This can be used to disable cert checking, set timeouts, and so on.

func (*ContivClient) TenantDelete

func (c *ContivClient) TenantDelete(tenantName string) error

TenantDelete deletes the tenant object

func (*ContivClient) TenantGet

func (c *ContivClient) TenantGet(tenantName string) (*Tenant, error)

TenantGet gets the tenant object

func (*ContivClient) TenantInspect

func (c *ContivClient) TenantInspect(tenantName string) (*TenantInspect, error)

TenantInspect gets the tenantInspect object

func (*ContivClient) TenantList

func (c *ContivClient) TenantList() (*[]*Tenant, error)

TenantList lists all tenant objects

func (*ContivClient) TenantPost

func (c *ContivClient) TenantPost(obj *Tenant) error

TenantPost posts the tenant object

func (*ContivClient) VolumeDelete

func (c *ContivClient) VolumeDelete(tenantName string, volumeName string) error

VolumeDelete deletes the volume object

func (*ContivClient) VolumeGet

func (c *ContivClient) VolumeGet(tenantName string, volumeName string) (*Volume, error)

VolumeGet gets the volume object

func (*ContivClient) VolumeInspect

func (c *ContivClient) VolumeInspect(tenantName string, volumeName string) (*VolumeInspect, error)

VolumeInspect gets the volumeInspect object

func (*ContivClient) VolumeList

func (c *ContivClient) VolumeList() (*[]*Volume, error)

VolumeList lists all volume objects

func (*ContivClient) VolumePost

func (c *ContivClient) VolumePost(obj *Volume) error

VolumePost posts the volume object

func (*ContivClient) VolumeProfileDelete

func (c *ContivClient) VolumeProfileDelete(tenantName string, volumeProfileName string) error

VolumeProfileDelete deletes the volumeProfile object

func (*ContivClient) VolumeProfileGet

func (c *ContivClient) VolumeProfileGet(tenantName string, volumeProfileName string) (*VolumeProfile, error)

VolumeProfileGet gets the volumeProfile object

func (*ContivClient) VolumeProfileInspect

func (c *ContivClient) VolumeProfileInspect(tenantName string, volumeProfileName string) (*VolumeProfileInspect, error)

VolumeProfileInspect gets the volumeProfileInspect object

func (*ContivClient) VolumeProfileList

func (c *ContivClient) VolumeProfileList() (*[]*VolumeProfile, error)

VolumeProfileList lists all volumeProfile objects

func (*ContivClient) VolumeProfilePost

func (c *ContivClient) VolumeProfilePost(obj *VolumeProfile) error

VolumeProfilePost posts the volumeProfile object

type EndpointGroup

type EndpointGroup struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	CfgdTag          string   `json:"cfgdTag,omitempty"` // Configured Group Tag
	ExtContractsGrps []string `json:"extContractsGrps,omitempty"`
	GroupName        string   `json:"groupName,omitempty"`   // Group name
	IpPool           string   `json:"ipPool,omitempty"`      // IP-pool
	NetProfile       string   `json:"netProfile,omitempty"`  // Network profile name
	NetworkName      string   `json:"networkName,omitempty"` // Network
	Policies         []string `json:"policies,omitempty"`
	TenantName       string   `json:"tenantName,omitempty"` // Tenant

	// add link-sets and links
	LinkSets EndpointGroupLinkSets `json:"link-sets,omitempty"`
	Links    EndpointGroupLinks    `json:"links,omitempty"`
}

EndpointGroup object

type EndpointGroupInspect

type EndpointGroupInspect struct {
	Config EndpointGroup

	Oper EndpointGroupOper
}

EndpointGroupInspect inspect information

type EndpointGroupLinkSets

type EndpointGroupLinkSets struct {
	ExtContractsGrps map[string]Link `json:"ExtContractsGrps,omitempty"`
	MatchRules       map[string]Link `json:"MatchRules,omitempty"`
	Policies         map[string]Link `json:"Policies,omitempty"`
	Services         map[string]Link `json:"Services,omitempty"`
}

EndpointGroupLinkSets list of internal links

type EndpointGroupLinks struct {
	AppProfile Link `json:"AppProfile,omitempty"`
	NetProfile Link `json:"NetProfile,omitempty"`
	Network    Link `json:"Network,omitempty"`
	Tenant     Link `json:"Tenant,omitempty"`
}

EndpointGroupLinks internal links to other object

type EndpointGroupOper

type EndpointGroupOper struct {
	AllocatedIPAddresses string         `json:"allocatedIPAddresses,omitempty"` // allocated IP addresses
	AvailableIPAddresses string         `json:"availableIPAddresses,omitempty"` // Available IP addresses
	Endpoints            []EndpointOper `json:"endpoints,omitempty"`
	ExternalPktTag       int            `json:"externalPktTag,omitempty"` // external packet tag
	GroupTag             string         `json:"groupTag,omitempty"`       // Derived EndpointGroup Tag
	NumEndpoints         int            `json:"numEndpoints,omitempty"`   // number of endpoints
	PktTag               int            `json:"pktTag,omitempty"`         // internal packet tag

}

EndpointGroupOper runtime operations

type EndpointInspect

type EndpointInspect struct {
	Oper EndpointOper
}

EndpointInspect inspect information

type EndpointOper

type EndpointOper struct {
	ContainerID      string   `json:"containerID,omitempty"`      //
	ContainerName    string   `json:"containerName,omitempty"`    //
	EndpointGroupID  int      `json:"endpointGroupId,omitempty"`  //
	EndpointGroupKey string   `json:"endpointGroupKey,omitempty"` //
	EndpointID       string   `json:"endpointID,omitempty"`       //
	HomingHost       string   `json:"homingHost,omitempty"`       //
	IntfName         string   `json:"intfName,omitempty"`         //
	IpAddress        []string `json:"ipAddress,omitempty"`
	Labels           string   `json:"labels,omitempty"`      //
	MacAddress       string   `json:"macAddress,omitempty"`  //
	Network          string   `json:"network,omitempty"`     //
	ServiceName      string   `json:"serviceName,omitempty"` //
	VirtualPort      string   `json:"virtualPort,omitempty"` //
	VtepIP           string   `json:"vtepIP,omitempty"`      //

}

EndpointOper runtime operations

type ExtContractsGroup

type ExtContractsGroup struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	Contracts          []string `json:"contracts,omitempty"`
	ContractsGroupName string   `json:"contractsGroupName,omitempty"` // Contracts group name
	ContractsType      string   `json:"contractsType,omitempty"`      // Contracts type
	TenantName         string   `json:"tenantName,omitempty"`         // Tenant name

	// add link-sets and links
	LinkSets ExtContractsGroupLinkSets `json:"link-sets,omitempty"`
}

ExtContractsGroup object

type ExtContractsGroupInspect

type ExtContractsGroupInspect struct {
	Config ExtContractsGroup
}

ExtContractsGroupInspect inspect information

type ExtContractsGroupLinkSets

type ExtContractsGroupLinkSets struct {
	EndpointGroups map[string]Link `json:"EndpointGroups,omitempty"`
}

ExtContractsGroupLinkSets list of internal links

type Global

type Global struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	ArpMode          string `json:"arpMode,omitempty"`          // ARP Mode
	FwdMode          string `json:"fwdMode,omitempty"`          // Forwarding Mode
	Name             string `json:"name,omitempty"`             // name of this block(must be 'global')
	NetworkInfraType string `json:"networkInfraType,omitempty"` // Network infrastructure type
	PvtSubnet        string `json:"pvtSubnet,omitempty"`        // Private Subnet used by host bridge
	Vlans            string `json:"vlans,omitempty"`            // Allowed vlan range
	Vxlans           string `json:"vxlans,omitempty"`           // Allwed vxlan range

}

Global object

type GlobalInspect

type GlobalInspect struct {
	Config Global

	Oper GlobalOper
}

GlobalInspect inspect information

type GlobalOper

type GlobalOper struct {
	ClusterMode     string `json:"clusterMode,omitempty"`     //
	DefaultNetwork  string `json:"defaultNetwork,omitempty"`  //
	FreeVXLANsStart int    `json:"freeVXLANsStart,omitempty"` //
	NumNetworks     int    `json:"numNetworks,omitempty"`     //
	VlansInUse      string `json:"vlansInUse,omitempty"`      //
	VxlansInUse     string `json:"vxlansInUse,omitempty"`     //

}

GlobalOper runtime operations

type Link struct {
	ObjType string `json:"type,omitempty"`
	ObjKey  string `json:"key,omitempty"`
}

Link is a one way relattion between two objects

type Netprofile

type Netprofile struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	DSCP        int    `json:"DSCP,omitempty"`        // DSCP
	Bandwidth   string `json:"bandwidth,omitempty"`   // Allocated bandwidth
	Burst       int    `json:"burst,omitempty"`       // burst size
	ProfileName string `json:"profileName,omitempty"` // Network profile name
	TenantName  string `json:"tenantName,omitempty"`  // Tenant name

	// add link-sets and links
	LinkSets NetprofileLinkSets `json:"link-sets,omitempty"`
	Links    NetprofileLinks    `json:"links,omitempty"`
}

Netprofile object

type NetprofileInspect

type NetprofileInspect struct {
	Config Netprofile
}

NetprofileInspect inspect information

type NetprofileLinkSets

type NetprofileLinkSets struct {
	EndpointGroups map[string]Link `json:"EndpointGroups,omitempty"`
}

NetprofileLinkSets list of internal links

type NetprofileLinks struct {
	Tenant Link `json:"Tenant,omitempty"`
}

NetprofileLinks internal links to other object

type Network

type Network struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	CfgdTag     string `json:"cfgdTag,omitempty"`     // Configured Network Tag
	Encap       string `json:"encap,omitempty"`       // Encapsulation
	Gateway     string `json:"gateway,omitempty"`     // Gateway
	Ipv6Gateway string `json:"ipv6Gateway,omitempty"` // IPv6Gateway
	Ipv6Subnet  string `json:"ipv6Subnet,omitempty"`  // IPv6Subnet
	NetworkName string `json:"networkName,omitempty"` // Network name
	NwType      string `json:"nwType,omitempty"`      // Network Type
	PktTag      int    `json:"pktTag,omitempty"`      // Vlan/Vxlan Tag
	Subnet      string `json:"subnet,omitempty"`      // Subnet
	TenantName  string `json:"tenantName,omitempty"`  // Tenant Name

	// add link-sets and links
	LinkSets NetworkLinkSets `json:"link-sets,omitempty"`
	Links    NetworkLinks    `json:"links,omitempty"`
}

Network object

type NetworkInspect

type NetworkInspect struct {
	Config Network

	Oper NetworkOper
}

NetworkInspect inspect information

type NetworkLinkSets

type NetworkLinkSets struct {
	EndpointGroups map[string]Link `json:"EndpointGroups,omitempty"`
	Servicelbs     map[string]Link `json:"Servicelbs,omitempty"`
	Services       map[string]Link `json:"Services,omitempty"`
}

NetworkLinkSets list of internal links

type NetworkLinks struct {
	Tenant Link `json:"Tenant,omitempty"`
}

NetworkLinks internal links to other object

type NetworkOper

type NetworkOper struct {
	AllocatedAddressesCount int            `json:"allocatedAddressesCount,omitempty"` // Vlan/Vxlan Tag
	AllocatedIPAddresses    string         `json:"allocatedIPAddresses,omitempty"`    // allocated IP addresses
	AvailableIPAddresses    string         `json:"availableIPAddresses,omitempty"`    // Available IP addresses
	Endpoints               []EndpointOper `json:"endpoints,omitempty"`
	ExternalPktTag          int            `json:"externalPktTag,omitempty"` // external packet tag
	NetworkTag              string         `json:"networkTag,omitempty"`     // Derived Network Tag
	NumEndpoints            int            `json:"numEndpoints,omitempty"`   // external packet tag
	PktTag                  int            `json:"pktTag,omitempty"`         // internal packet tag

}

NetworkOper runtime operations

type Policy

type Policy struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	PolicyName string `json:"policyName,omitempty"` // Policy Name
	TenantName string `json:"tenantName,omitempty"` // Tenant Name

	// add link-sets and links
	LinkSets PolicyLinkSets `json:"link-sets,omitempty"`
	Links    PolicyLinks    `json:"links,omitempty"`
}

Policy object

type PolicyInspect

type PolicyInspect struct {
	Config Policy

	Oper PolicyOper
}

PolicyInspect inspect information

type PolicyLinkSets

type PolicyLinkSets struct {
	EndpointGroups map[string]Link `json:"EndpointGroups,omitempty"`
	Rules          map[string]Link `json:"Rules,omitempty"`
}

PolicyLinkSets list of internal links

type PolicyLinks struct {
	Tenant Link `json:"Tenant,omitempty"`
}

PolicyLinks internal links to other object

type PolicyOper

type PolicyOper struct {
	Endpoints        []EndpointOper `json:"endpoints,omitempty"`
	NumEndpoints     int            `json:"numEndpoints,omitempty"`     // number of endpoints
	PolicyViolations int            `json:"policyViolations,omitempty"` // number of policyViolations

}

PolicyOper runtime operations

type Rule

type Rule struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	Action            string `json:"action,omitempty"`            // Action
	Direction         string `json:"direction,omitempty"`         // Direction
	FromEndpointGroup string `json:"fromEndpointGroup,omitempty"` // From Endpoint Group
	FromIpAddress     string `json:"fromIpAddress,omitempty"`     // IP Address
	FromNetwork       string `json:"fromNetwork,omitempty"`       // From Network
	PolicyName        string `json:"policyName,omitempty"`        // Policy Name
	Port              int    `json:"port,omitempty"`              // Port No
	Priority          int    `json:"priority,omitempty"`          // Priority
	Protocol          string `json:"protocol,omitempty"`          // Protocol
	RuleID            string `json:"ruleId,omitempty"`            // Rule Id
	TenantName        string `json:"tenantName,omitempty"`        // Tenant Name
	ToEndpointGroup   string `json:"toEndpointGroup,omitempty"`   // To Endpoint Group
	ToIpAddress       string `json:"toIpAddress,omitempty"`       // IP Address
	ToNetwork         string `json:"toNetwork,omitempty"`         // To Network

	// add link-sets and links
	LinkSets RuleLinkSets `json:"link-sets,omitempty"`
	Links    RuleLinks    `json:"links,omitempty"`
}

Rule object

type RuleInspect

type RuleInspect struct {
	Config Rule
}

RuleInspect inspect information

type RuleLinkSets

type RuleLinkSets struct {
	Policies map[string]Link `json:"Policies,omitempty"`
}

RuleLinkSets list of internal links

type RuleLinks struct {
	MatchEndpointGroup Link `json:"MatchEndpointGroup,omitempty"`
}

RuleLinks internal links to other object

type ServiceLB

type ServiceLB struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	IpAddress   string   `json:"ipAddress,omitempty"`   // Service ip
	NetworkName string   `json:"networkName,omitempty"` // Service network name
	Ports       []string `json:"ports,omitempty"`
	Selectors   []string `json:"selectors,omitempty"`
	ServiceName string   `json:"serviceName,omitempty"` // service name
	TenantName  string   `json:"tenantName,omitempty"`  // Tenant Name

	Links ServiceLBLinks `json:"links,omitempty"`
}

ServiceLB object

type ServiceLBInspect

type ServiceLBInspect struct {
	Config ServiceLB

	Oper ServiceLBOper
}

ServiceLBInspect inspect information

type ServiceLBLinks struct {
	Network Link `json:"Network,omitempty"`
	Tenant  Link `json:"Tenant,omitempty"`
}

ServiceLBLinks internal links to other object

type ServiceLBOper

type ServiceLBOper struct {
	NumProviders int            `json:"numProviders,omitempty"` //  number of provider endpoints for the service
	Providers    []EndpointOper `json:"providers,omitempty"`
	ServiceVip   string         `json:"serviceVip,omitempty"` // allocated IP addresses

}

ServiceLBOper runtime operations

type Tenant

type Tenant struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	DefaultNetwork string `json:"defaultNetwork,omitempty"` // Network name
	TenantName     string `json:"tenantName,omitempty"`     // Tenant Name

	// add link-sets and links
	LinkSets TenantLinkSets `json:"link-sets,omitempty"`
}

Tenant object

type TenantInspect

type TenantInspect struct {
	Config Tenant

	Oper TenantOper
}

TenantInspect inspect information

type TenantLinkSets

type TenantLinkSets struct {
	AppProfiles    map[string]Link `json:"AppProfiles,omitempty"`
	EndpointGroups map[string]Link `json:"EndpointGroups,omitempty"`
	NetProfiles    map[string]Link `json:"NetProfiles,omitempty"`
	Networks       map[string]Link `json:"Networks,omitempty"`
	Policies       map[string]Link `json:"Policies,omitempty"`
	Servicelbs     map[string]Link `json:"Servicelbs,omitempty"`
	VolumeProfiles map[string]Link `json:"VolumeProfiles,omitempty"`
	Volumes        map[string]Link `json:"Volumes,omitempty"`
}

TenantLinkSets list of internal links

type TenantOper

type TenantOper struct {
	EndpointGroups   []EndpointGroupOper `json:"endpointGroups,omitempty"`
	Endpoints        []EndpointOper      `json:"endpoints,omitempty"`
	Networks         []NetworkOper       `json:"networks,omitempty"`
	Policies         []PolicyOper        `json:"policies,omitempty"`
	Servicelbs       []ServiceLBOper     `json:"servicelbs,omitempty"`
	TotalAppProfiles int                 `json:"totalAppProfiles,omitempty"` // total number of App-Profiles
	TotalEPGs        int                 `json:"totalEPGs,omitempty"`        // total number of EPGs
	TotalEndpoints   int                 `json:"totalEndpoints,omitempty"`   // total number of endpoints in the tenant
	TotalNetprofiles int                 `json:"totalNetprofiles,omitempty"` // total number of Netprofiles
	TotalNetworks    int                 `json:"totalNetworks,omitempty"`    // total number of networks
	TotalPolicies    int                 `json:"totalPolicies,omitempty"`    // total number of totalPolicies
	TotalServicelbs  int                 `json:"totalServicelbs,omitempty"`  // total number of Servicelbs

}

TenantOper runtime operations

type Volume

type Volume struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	DatastoreType string `json:"datastoreType,omitempty"` //
	MountPoint    string `json:"mountPoint,omitempty"`    //
	PoolName      string `json:"poolName,omitempty"`      //
	Size          string `json:"size,omitempty"`          //
	TenantName    string `json:"tenantName,omitempty"`    // Tenant Name
	VolumeName    string `json:"volumeName,omitempty"`    // Volume Name

	// add link-sets and links
	LinkSets VolumeLinkSets `json:"link-sets,omitempty"`
	Links    VolumeLinks    `json:"links,omitempty"`
}

Volume object

type VolumeInspect

type VolumeInspect struct {
	Config Volume
}

VolumeInspect inspect information

type VolumeLinkSets

type VolumeLinkSets struct {
	ServiceInstances map[string]Link `json:"ServiceInstances,omitempty"`
}

VolumeLinkSets list of internal links

type VolumeLinks struct {
	Tenant Link `json:"Tenant,omitempty"`
}

VolumeLinks internal links to other object

type VolumeProfile

type VolumeProfile struct {
	// every object has a key
	Key string `json:"key,omitempty"`

	DatastoreType     string `json:"datastoreType,omitempty"`     //
	MountPoint        string `json:"mountPoint,omitempty"`        //
	PoolName          string `json:"poolName,omitempty"`          //
	Size              string `json:"size,omitempty"`              //
	TenantName        string `json:"tenantName,omitempty"`        // Tenant Name
	VolumeProfileName string `json:"volumeProfileName,omitempty"` // Volume profile Name

	// add link-sets and links
	LinkSets VolumeProfileLinkSets `json:"link-sets,omitempty"`
	Links    VolumeProfileLinks    `json:"links,omitempty"`
}

VolumeProfile object

type VolumeProfileInspect

type VolumeProfileInspect struct {
	Config VolumeProfile
}

VolumeProfileInspect inspect information

type VolumeProfileLinkSets

type VolumeProfileLinkSets struct {
	Services map[string]Link `json:"Services,omitempty"`
}

VolumeProfileLinkSets list of internal links

type VolumeProfileLinks struct {
	Tenant Link `json:"Tenant,omitempty"`
}

VolumeProfileLinks internal links to other object

Jump to

Keyboard shortcuts

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