contivmodel: github.com/contiv/contivmodel/client Index | Files

package client

import "github.com/contiv/contivmodel/client"

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

Package Files

contivModelClient.go

type AciGw Uses

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 Uses

type AciGwInspect struct {
    Config AciGw

    Oper AciGwOper
}

AciGwInspect inspect information

type AciGwOper Uses

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

}

AciGwOper runtime operations

type AppProfile Uses

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 Uses

type AppProfileInspect struct {
    Config AppProfile
}

AppProfileInspect inspect information

type AppProfileLinkSets Uses

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 Uses

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 Uses

type BgpInspect struct {
    Config Bgp

    Oper BgpOper
}

BgpInspect inspect information

type BgpOper Uses

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 Uses

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

ContivClient has the contiv model client instance

func NewContivClient Uses

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

NewContivClient creates a new client instance

func (*ContivClient) AciGwDelete Uses

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

AciGwDelete deletes the aciGw object

func (*ContivClient) AciGwGet Uses

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

AciGwGet gets the aciGw object

func (*ContivClient) AciGwInspect Uses

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

AciGwInspect gets the aciGwInspect object

func (*ContivClient) AciGwList Uses

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

AciGwList lists all aciGw objects

func (*ContivClient) AciGwPost Uses

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

AciGwPost posts the aciGw object

func (*ContivClient) AppProfileDelete Uses

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

AppProfileDelete deletes the appProfile object

func (*ContivClient) AppProfileGet Uses

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

AppProfileGet gets the appProfile object

func (*ContivClient) AppProfileInspect Uses

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

AppProfileInspect gets the appProfileInspect object

func (*ContivClient) AppProfileList Uses

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

AppProfileList lists all appProfile objects

func (*ContivClient) AppProfilePost Uses

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

AppProfilePost posts the appProfile object

func (*ContivClient) BgpDelete Uses

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

BgpDelete deletes the Bgp object

func (*ContivClient) BgpGet Uses

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

BgpGet gets the Bgp object

func (*ContivClient) BgpInspect Uses

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

BgpInspect gets the BgpInspect object

func (*ContivClient) BgpList Uses

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

BgpList lists all Bgp objects

func (*ContivClient) BgpPost Uses

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

BgpPost posts the Bgp object

func (*ContivClient) EndpointGroupDelete Uses

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

EndpointGroupDelete deletes the endpointGroup object

func (*ContivClient) EndpointGroupGet Uses

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

EndpointGroupGet gets the endpointGroup object

func (*ContivClient) EndpointGroupInspect Uses

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

EndpointGroupInspect gets the endpointGroupInspect object

func (*ContivClient) EndpointGroupList Uses

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

EndpointGroupList lists all endpointGroup objects

func (*ContivClient) EndpointGroupPost Uses

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

EndpointGroupPost posts the endpointGroup object

func (*ContivClient) EndpointInspect Uses

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

EndpointInspect gets the endpointInspect object

func (*ContivClient) ExtContractsGroupDelete Uses

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

ExtContractsGroupDelete deletes the extContractsGroup object

func (*ContivClient) ExtContractsGroupGet Uses

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

ExtContractsGroupGet gets the extContractsGroup object

func (*ContivClient) ExtContractsGroupInspect Uses

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

ExtContractsGroupInspect gets the extContractsGroupInspect object

func (*ContivClient) ExtContractsGroupList Uses

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

ExtContractsGroupList lists all extContractsGroup objects

func (*ContivClient) ExtContractsGroupPost Uses

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

ExtContractsGroupPost posts the extContractsGroup object

func (*ContivClient) GlobalDelete Uses

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

GlobalDelete deletes the global object

func (*ContivClient) GlobalGet Uses

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

GlobalGet gets the global object

func (*ContivClient) GlobalInspect Uses

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

GlobalInspect gets the globalInspect object

func (*ContivClient) GlobalList Uses

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

GlobalList lists all global objects

func (*ContivClient) GlobalPost Uses

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

GlobalPost posts the global object

func (*ContivClient) NetprofileDelete Uses

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

NetprofileDelete deletes the netprofile object

func (*ContivClient) NetprofileGet Uses

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

NetprofileGet gets the netprofile object

func (*ContivClient) NetprofileInspect Uses

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

NetprofileInspect gets the netprofileInspect object

func (*ContivClient) NetprofileList Uses

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

NetprofileList lists all netprofile objects

func (*ContivClient) NetprofilePost Uses

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

NetprofilePost posts the netprofile object

func (*ContivClient) NetworkDelete Uses

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

NetworkDelete deletes the network object

func (*ContivClient) NetworkGet Uses

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

NetworkGet gets the network object

func (*ContivClient) NetworkInspect Uses

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

NetworkInspect gets the networkInspect object

func (*ContivClient) NetworkList Uses

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

NetworkList lists all network objects

func (*ContivClient) NetworkPost Uses

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

NetworkPost posts the network object

func (*ContivClient) PolicyDelete Uses

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

PolicyDelete deletes the policy object

func (*ContivClient) PolicyGet Uses

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

PolicyGet gets the policy object

func (*ContivClient) PolicyInspect Uses

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

PolicyInspect gets the policyInspect object

func (*ContivClient) PolicyList Uses

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

PolicyList lists all policy objects

func (*ContivClient) PolicyPost Uses

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

PolicyPost posts the policy object

func (*ContivClient) RuleDelete Uses

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

RuleDelete deletes the rule object

func (*ContivClient) RuleGet Uses

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

RuleGet gets the rule object

func (*ContivClient) RuleInspect Uses

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

RuleInspect gets the ruleInspect object

func (*ContivClient) RuleList Uses

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

RuleList lists all rule objects

func (*ContivClient) RulePost Uses

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

RulePost posts the rule object

func (*ContivClient) ServiceLBDelete Uses

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

ServiceLBDelete deletes the serviceLB object

func (*ContivClient) ServiceLBGet Uses

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

ServiceLBGet gets the serviceLB object

func (*ContivClient) ServiceLBInspect Uses

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

ServiceLBInspect gets the serviceLBInspect object

func (*ContivClient) ServiceLBList Uses

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

ServiceLBList lists all serviceLB objects

func (*ContivClient) ServiceLBPost Uses

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

ServiceLBPost posts the serviceLB object

func (*ContivClient) TenantDelete Uses

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

TenantDelete deletes the tenant object

func (*ContivClient) TenantGet Uses

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

TenantGet gets the tenant object

func (*ContivClient) TenantInspect Uses

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

TenantInspect gets the tenantInspect object

func (*ContivClient) TenantList Uses

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

TenantList lists all tenant objects

func (*ContivClient) TenantPost Uses

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

TenantPost posts the tenant object

func (*ContivClient) VolumeDelete Uses

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

VolumeDelete deletes the volume object

func (*ContivClient) VolumeGet Uses

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

VolumeGet gets the volume object

func (*ContivClient) VolumeInspect Uses

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

VolumeInspect gets the volumeInspect object

func (*ContivClient) VolumeList Uses

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

VolumeList lists all volume objects

func (*ContivClient) VolumePost Uses

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

VolumePost posts the volume object

func (*ContivClient) VolumeProfileDelete Uses

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

VolumeProfileDelete deletes the volumeProfile object

func (*ContivClient) VolumeProfileGet Uses

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

VolumeProfileGet gets the volumeProfile object

func (*ContivClient) VolumeProfileInspect Uses

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

VolumeProfileInspect gets the volumeProfileInspect object

func (*ContivClient) VolumeProfileList Uses

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

VolumeProfileList lists all volumeProfile objects

func (*ContivClient) VolumeProfilePost Uses

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

VolumeProfilePost posts the volumeProfile object

type EndpointGroup Uses

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

    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 Uses

type EndpointGroupInspect struct {
    Config EndpointGroup

    Oper EndpointGroupOper
}

EndpointGroupInspect inspect information

type EndpointGroupLinkSets Uses

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 Uses

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
    NumEndpoints         int            `json:"numEndpoints,omitempty"`   // number of endpoints
    PktTag               int            `json:"pktTag,omitempty"`         // internal packet tag

}

EndpointGroupOper runtime operations

type EndpointInspect Uses

type EndpointInspect struct {
    Oper EndpointOper
}

EndpointInspect inspect information

type EndpointOper Uses

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 Uses

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 Uses

type ExtContractsGroupInspect struct {
    Config ExtContractsGroup
}

ExtContractsGroupInspect inspect information

type ExtContractsGroupLinkSets Uses

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

ExtContractsGroupLinkSets list of internal links

type Global Uses

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 Uses

type GlobalInspect struct {
    Config Global

    Oper GlobalOper
}

GlobalInspect inspect information

type GlobalOper Uses

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 Uses

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 Uses

type NetprofileInspect struct {
    Config Netprofile
}

NetprofileInspect inspect information

type NetprofileLinkSets Uses

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 Uses

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

    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 Uses

type NetworkInspect struct {
    Config Network

    Oper NetworkOper
}

NetworkInspect inspect information

type NetworkLinkSets Uses

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 Uses

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
    NumEndpoints            int            `json:"numEndpoints,omitempty"`   // external packet tag
    PktTag                  int            `json:"pktTag,omitempty"`         // internal packet tag

}

NetworkOper runtime operations

type Policy Uses

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 Uses

type PolicyInspect struct {
    Config Policy

    Oper PolicyOper
}

PolicyInspect inspect information

type PolicyLinkSets Uses

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 Uses

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 Uses

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 Uses

type RuleInspect struct {
    Config Rule
}

RuleInspect inspect information

type RuleLinkSets Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

type TenantInspect struct {
    Config Tenant

    Oper TenantOper
}

TenantInspect inspect information

type TenantLinkSets Uses

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 Uses

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 Uses

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 Uses

type VolumeInspect struct {
    Config Volume
}

VolumeInspect inspect information

type VolumeLinkSets Uses

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 Uses

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 Uses

type VolumeProfileInspect struct {
    Config VolumeProfile
}

VolumeProfileInspect inspect information

type VolumeProfileLinkSets Uses

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

Package client imports 6 packages (graph) and is imported by 1 packages. Updated 2017-03-03. Refresh now. Tools for package owners.