aci

package
v0.0.0-...-ba99889 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: MIT Imports: 16 Imported by: 28

Documentation

Overview

Package aci is a Go module for interacting with Cisco ACI using API calls.

Example

package main

import (
	"fmt"
	"github.com/udhos/acigo/aci"
)

func main() {

	a, errNew := aci.New(aci.ClientOptions{})
	if errNew != nil {
		fmt.Printf("login new client error: %v\n", errNew)
		return
	}

	// Since credentials have not been specified explicitly under ClientOptions,
	// Login() will use env vars: APIC_HOSTS=host, APIC_USER=username, APIC_PASS=pwd
	errLogin := a.Login()
	if errLogin != nil {
		fmt.Printf("login error: %v\n", errLogin)
		return
	}

	errAdd := a.TenantAdd("tenant-example", "")
	if errAdd != nil {
		fmt.Printf("tenant add error: %v\n", errAdd)
		return
	}

	errLogout := a.Logout()
	if errLogout != nil {
		fmt.Printf("logout error: %v\n", errLogout)
		return
	}
}

See also

Cisco APIC REST API User Guide: http://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/1-x/api/rest/b_APIC_RESTful_API_User_Guide.html

APIC Management Information Model Reference: https://developer.cisco.com/media/mim-ref

Index

Constants

View Source
const (
	ApicHosts = "APIC_HOSTS" // Env var. List of apic hostnames. Example: "1.1.1.1" or "1.1.1.1,2.2.2.2,3.3.3.3" or "apic1,4.4.4.4"
	ApicUser  = "APIC_USER"  // Env var. Username. Example: "joe"
	ApicPass  = "APIC_PASS"  // Env var. Password. Example: "joesecret"
)

Environment variables used as default parameters.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Opt ClientOptions // Options for the APIC client
	// contains filtered or unexported fields
}

Client is an instance for interacting with ACI using API calls.

func New

func New(o ClientOptions) (*Client, error)

New creates a new Client instance for interacting with ACI using API calls.

func (*Client) ApplicationEPGAdd

func (c *Client) ApplicationEPGAdd(tenant, applicationProfile, bridgeDomain, epg, descr string) error

ApplicationEPGAdd creates a new application EPG in an application profile and attached to a bridge domain.

func (*Client) ApplicationEPGDel

func (c *Client) ApplicationEPGDel(tenant, applicationProfile, epg string) error

ApplicationEPGDel deletes an existing application EPG from an application profile.

func (*Client) ApplicationEPGList

func (c *Client) ApplicationEPGList(tenant, applicationProfile string) ([]map[string]interface{}, error)

ApplicationEPGList retrieves the list of application EPGs in an application profile.

func (*Client) ApplicationProfileAdd

func (c *Client) ApplicationProfileAdd(tenant, name, descr string) error

ApplicationProfileAdd creates a new application profile in a tenant.

func (*Client) ApplicationProfileDel

func (c *Client) ApplicationProfileDel(tenant, name string) error

ApplicationProfileDel deletes an existing application profile from a tenant.

func (*Client) ApplicationProfileList

func (c *Client) ApplicationProfileList(tenant string) ([]map[string]interface{}, error)

ApplicationProfileList retrieves application profiles from a tenant.

func (*Client) AttachableAccessEntityProfileAdd

func (c *Client) AttachableAccessEntityProfileAdd(aep, descr string) error

AttachableAccessEntityProfileAdd creates an AAEP.

func (*Client) AttachableAccessEntityProfileDel

func (c *Client) AttachableAccessEntityProfileDel(aep string) error

AttachableAccessEntityProfileDel deletes an AAEP.

func (*Client) AttachableAccessEntityProfileDomainL2Add

func (c *Client) AttachableAccessEntityProfileDomainL2Add(aep, l2dom string) error

AttachableAccessEntityProfileDomainL2Add attaches an L2 Domain to the AAEP.

func (*Client) AttachableAccessEntityProfileDomainL2Del

func (c *Client) AttachableAccessEntityProfileDomainL2Del(aep, l2dom string) error

AttachableAccessEntityProfileDomainL2Del detaches an L2 Domain from the AAEP.

func (*Client) AttachableAccessEntityProfileDomainL3Add

func (c *Client) AttachableAccessEntityProfileDomainL3Add(aep, l3dom string) error

AttachableAccessEntityProfileDomainL3Add attaches an L3 Domain to the AAEP.

func (*Client) AttachableAccessEntityProfileDomainL3Del

func (c *Client) AttachableAccessEntityProfileDomainL3Del(aep, l3dom string) error

AttachableAccessEntityProfileDomainL3Del detaches an L3 Domain from the AAEP.

func (*Client) AttachableAccessEntityProfileDomainList

func (c *Client) AttachableAccessEntityProfileDomainList(aep string) ([]map[string]interface{}, error)

AttachableAccessEntityProfileDomainList retrieves the list of domains attached to the AAEP.

func (*Client) AttachableAccessEntityProfileDomainVmmVMWareAdd

func (c *Client) AttachableAccessEntityProfileDomainVmmVMWareAdd(aep, domainVMWare string) error

AttachableAccessEntityProfileDomainVmmVMWareAdd attaches a VMM VMWare Domain to the AAEP.

func (*Client) AttachableAccessEntityProfileDomainVmmVMWareDel

func (c *Client) AttachableAccessEntityProfileDomainVmmVMWareDel(aep, domainVMWare string) error

AttachableAccessEntityProfileDomainVmmVMWareDel detaches a VMM VMWare Domain from the AAEP.

func (*Client) AttachableAccessEntityProfileList

func (c *Client) AttachableAccessEntityProfileList() ([]map[string]interface{}, error)

AttachableAccessEntityProfileList retrieves the list of AAEPs.

func (*Client) BridgeDomainAdd

func (c *Client) BridgeDomainAdd(tenant, bd, descr string) error

BridgeDomainAdd creates a new bridge domain in a tenant.

func (*Client) BridgeDomainDel

func (c *Client) BridgeDomainDel(tenant, bd string) error

BridgeDomainDel deletes an existing bridge domain from a tenant.

func (*Client) BridgeDomainL3ExtOutAdd

func (c *Client) BridgeDomainL3ExtOutAdd(tenant, bd, out string) error

BridgeDomainL3ExtOutAdd attaches a new L3 External Outside in a bridge domain.

func (*Client) BridgeDomainL3ExtOutDel

func (c *Client) BridgeDomainL3ExtOutDel(tenant, bd, out string) error

BridgeDomainL3ExtOutDel detaches an existing L3 External Outside from a bridge domain.

func (*Client) BridgeDomainL3ExtOutList

func (c *Client) BridgeDomainL3ExtOutList(tenant, bd string) ([]map[string]interface{}, error)

BridgeDomainL3ExtOutList retrieves the list of L3 External Outsides attached to a bridge domain.

func (*Client) BridgeDomainList

func (c *Client) BridgeDomainList(tenant string) ([]map[string]interface{}, error)

BridgeDomainList retrieves the list of bridge domains from a tenant.

func (*Client) BridgeDomainSetUnicastRouting

func (c *Client) BridgeDomainSetUnicastRouting(tenant, bd string, enabled bool) error

BridgeDomainSetUnicastRouting sets or clears the "Enable unicast routing" flag

func (*Client) BridgeDomainSubnetAdd

func (c *Client) BridgeDomainSubnetAdd(tenant, bd, subnet, descr string) error

BridgeDomainSubnetAdd creates a new subnet in a bridge domain.

func (*Client) BridgeDomainSubnetDel

func (c *Client) BridgeDomainSubnetDel(tenant, bd, subnet string) error

BridgeDomainSubnetDel deletes an existing subnet from a bridge domain.

func (*Client) BridgeDomainSubnetGet

func (c *Client) BridgeDomainSubnetGet(tenant, bd, subnet string) ([]map[string]interface{}, error)

BridgeDomainSubnetGet retrieves specific subnet from a bridge domain.

func (*Client) BridgeDomainSubnetList

func (c *Client) BridgeDomainSubnetList(tenant, bd string) ([]map[string]interface{}, error)

BridgeDomainSubnetList retrieves the list of subnets from a bridge domain.

func (*Client) BridgeDomainSubnetScopeGet

func (c *Client) BridgeDomainSubnetScopeGet(tenant, bd, subnet string) (string, error)

BridgeDomainSubnetScopeGet retrieves the scope from a bridge domain subnet.

func (*Client) BridgeDomainSubnetScopeSet

func (c *Client) BridgeDomainSubnetScopeSet(tenant, bd, subnet, scope string) error

BridgeDomainSubnetScopeSet defines the scope for a bridge domain subnet.

func (*Client) BridgeDomainVrfGet

func (c *Client) BridgeDomainVrfGet(tenant, bd string) (string, error)

BridgeDomainVrfGet retrieves the VRF for a bridge domain.

func (*Client) BridgeDomainVrfSet

func (c *Client) BridgeDomainVrfSet(tenant, bd, vrf string) error

BridgeDomainVrfSet defines the VRF for a bridge domain.

func (*Client) ContractAdd

func (c *Client) ContractAdd(tenant, contract, scope, descr string) error

ContractAdd creates a new contract.

func (*Client) ContractDel

func (c *Client) ContractDel(tenant, contract string) error

ContractDel deletes an existing contract.

func (*Client) ContractList

func (c *Client) ContractList(tenant string) ([]map[string]interface{}, error)

ContractList retrieves the list of contracts.

func (*Client) ContractSubjectAdd

func (c *Client) ContractSubjectAdd(tenant, contract, subject, reverseFilterPorts string, applyBothDirections bool, descr string) error

ContractSubjectAdd creates a new subject. reverseFilterPorts: "true", "false", "" (empty means default) reverseFilterPorts means the ACI will automatically create a rule with opposite ports to allow the return traffic. For example, if you have a filter allowing traffic from src=X to dst=80, by enabling reverseFilterPorts an implicit rule will be added to allow traffic from src=80 to dst=X. applyBothDirections means the subject will apply its filters to both directions. If applyBothDirections is enabled, use these functions to manage subject filters: SubjectFilterBothAdd(), SubjectFilterBothDel(), SubjectFilterBothList(). If applyBothDirections is disabled, use these functions to manage subject filters: SubjectFilterInputAdd(), SubjectFilterInputDel(), SubjectFilterInputList(), SubjectFilterOutputAdd(), SubjectFilterOutputDel(), SubjectFilterOutputList()

func (*Client) ContractSubjectDel

func (c *Client) ContractSubjectDel(tenant, contract, subject string) error

ContractSubjectDel deletes an existing subject.

func (*Client) ContractSubjectList

func (c *Client) ContractSubjectList(tenant, contract string) ([]map[string]interface{}, error)

ContractSubjectList retrieves the list of subjects.

func (*Client) EPGContractConsumedAdd

func (c *Client) EPGContractConsumedAdd(tenant, applicationProfile, epg, contract string) error

EPGContractConsumedAdd attaches contract as consumed by EPG.

func (*Client) EPGContractConsumedDel

func (c *Client) EPGContractConsumedDel(tenant, applicationProfile, epg, contract string) error

EPGContractConsumedDel detaches consumed contract from EPG.

func (*Client) EPGContractConsumedList

func (c *Client) EPGContractConsumedList(tenant, applicationProfile, epg string) ([]map[string]interface{}, error)

EPGContractConsumedList retrieves the list of contracts consumed by EPG.

func (*Client) EPGContractProvidedAdd

func (c *Client) EPGContractProvidedAdd(tenant, applicationProfile, epg, contract string) error

EPGContractProvidedAdd attaches contract as provided by EPG.

func (*Client) EPGContractProvidedDel

func (c *Client) EPGContractProvidedDel(tenant, applicationProfile, epg, contract string) error

EPGContractProvidedDel detaches provided contract from EPG.

func (*Client) EPGContractProvidedList

func (c *Client) EPGContractProvidedList(tenant, applicationProfile, epg string) ([]map[string]interface{}, error)

EPGContractProvidedList retrieves the list of contracts provided by EPG.

func (*Client) ExportConfigurationAdd

func (c *Client) ExportConfigurationAdd(config, scheduler, remoteLocation, descr string) error

ExportConfigurationAdd creates a new export configuration.

func (*Client) ExportConfigurationDel

func (c *Client) ExportConfigurationDel(config string) error

ExportConfigurationDel deletes an existing export configuration.

func (*Client) ExportConfigurationList

func (c *Client) ExportConfigurationList() ([]map[string]interface{}, error)

ExportConfigurationList retrieves the list of export configurations.

func (*Client) ExportConfigurationRemoteLocationGet

func (c *Client) ExportConfigurationRemoteLocationGet(config string) (map[string]interface{}, error)

ExportConfigurationRemoteLocationGet retrieves the remote location attached to an export configuration.

func (*Client) ExportConfigurationRun

func (c *Client) ExportConfigurationRun(config string) error

ExportConfigurationRun executes the export configuration now.

func (*Client) ExportConfigurationSchedulerGet

func (c *Client) ExportConfigurationSchedulerGet(config string) (map[string]interface{}, error)

ExportConfigurationSchedulerGet retrieves the scheduler attached to an export configuration.

func (*Client) ExternalRoutedDomainAdd

func (c *Client) ExternalRoutedDomainAdd(dom string) error

ExternalRoutedDomainAdd creates a new L3 External Domain.

func (*Client) ExternalRoutedDomainDel

func (c *Client) ExternalRoutedDomainDel(dom string) error

ExternalRoutedDomainDel deletes an existing L3 External Domain.

func (*Client) ExternalRoutedDomainList

func (c *Client) ExternalRoutedDomainList() ([]map[string]interface{}, error)

ExternalRoutedDomainList retrieves the list of L3 External Domains.

func (*Client) FaultList

func (c *Client) FaultList() ([]map[string]interface{}, error)

FaultList retrieves the list of faults in the fabric.

func (*Client) FilterAdd

func (c *Client) FilterAdd(tenant, filter, descr string) error

FilterAdd creates a new filter.

func (*Client) FilterDel

func (c *Client) FilterDel(tenant, filter string) error

FilterDel deletes an existing filter.

func (*Client) FilterEntryAdd

func (c *Client) FilterEntryAdd(tenant, filter, entry, etherType, ipProto, srcPortFrom, srcPortTo, dstPortFrom, dstPortTo string) error

FilterEntryAdd creates a new filter entry.

func (*Client) FilterEntryDel

func (c *Client) FilterEntryDel(tenant, filter, entry string) error

FilterEntryDel deletes an existing filter entry.

func (*Client) FilterEntryList

func (c *Client) FilterEntryList(tenant, filter string) ([]map[string]interface{}, error)

FilterEntryList retrieves the list of filter entries.

func (*Client) FilterList

func (c *Client) FilterList(tenant string) ([]map[string]interface{}, error)

FilterList retrieves the list of filters.

func (*Client) L3ExtOutAdd

func (c *Client) L3ExtOutAdd(tenant, out, descr string) error

L3ExtOutAdd creates a new external routed network in a tenant.

func (*Client) L3ExtOutDel

func (c *Client) L3ExtOutDel(tenant, out string) error

L3ExtOutDel deletes an external routed network from a tenant.

func (*Client) L3ExtOutL3ExtDomainGet

func (c *Client) L3ExtOutL3ExtDomainGet(tenant, out string) (string, error)

L3ExtOutL3ExtDomainGet retrieves the external routed domain for an external routed network.

func (*Client) L3ExtOutL3ExtDomainSet

func (c *Client) L3ExtOutL3ExtDomainSet(tenant, out, domain string) error

L3ExtOutL3ExtDomainSet defines the external routed domain for an external routed network.

func (*Client) L3ExtOutList

func (c *Client) L3ExtOutList(tenant string) ([]map[string]interface{}, error)

L3ExtOutList retrieves the list of external routed networks from a tenant.

func (*Client) L3ExtOutVrfGet

func (c *Client) L3ExtOutVrfGet(tenant, out string) (string, error)

L3ExtOutVrfGet retrieves the VRF for an external routed network.

func (*Client) L3ExtOutVrfSet

func (c *Client) L3ExtOutVrfSet(tenant, out, vrf string) error

L3ExtOutVrfSet defines the VRF for an external routed network.

func (*Client) LeafInterfacePolicyGroupAdd

func (c *Client) LeafInterfacePolicyGroupAdd(group, descr string) error

LeafInterfacePolicyGroupAdd creates a policy group for leaf access ports.

func (*Client) LeafInterfacePolicyGroupDel

func (c *Client) LeafInterfacePolicyGroupDel(group string) error

LeafInterfacePolicyGroupDel deletes a policy group for leaf access ports.

func (*Client) LeafInterfacePolicyGroupEntityGet

func (c *Client) LeafInterfacePolicyGroupEntityGet(group string) (string, error)

LeafInterfacePolicyGroupEntityGet gets the AAEP attached to the leaf interface policy group.

func (*Client) LeafInterfacePolicyGroupEntitySet

func (c *Client) LeafInterfacePolicyGroupEntitySet(group, aep string) error

LeafInterfacePolicyGroupEntitySet attaches an AAEP to the leaf interface policy group.

func (*Client) LeafInterfacePolicyGroupList

func (c *Client) LeafInterfacePolicyGroupList() ([]map[string]interface{}, error)

LeafInterfacePolicyGroupList retrieves the list of policy groups for leaf access ports.

func (*Client) Login

func (c *Client) Login() error

Login opens a new session into APIC using the API aaaLogin.

func (*Client) Logout

func (c *Client) Logout() error

Logout closes a session to APIC using the API aaaLogout.

func (*Client) NodeAdd

func (c *Client) NodeAdd(name, ID, serial string) error

NodeAdd creates a new fabric membership node.

func (*Client) NodeDel

func (c *Client) NodeDel(serial string) error

NodeDel deletes an existing fabric membership node.

func (*Client) NodeList

func (c *Client) NodeList() ([]map[string]interface{}, error)

NodeList retrieves the list of top level system elements (APICs, spines, leaves).

func (*Client) PhysicalDomainAdd

func (c *Client) PhysicalDomainAdd(name, vlanpoolName, vlanpoolMode string) error

PhysicalDomainAdd creates a new physical domain.

func (*Client) PhysicalDomainDel

func (c *Client) PhysicalDomainDel(name string) error

PhysicalDomainDel deletes an existing physical domain.

func (*Client) PhysicalDomainList

func (c *Client) PhysicalDomainList() ([]map[string]interface{}, error)

PhysicalDomainList retrieves the list of physical domains.

func (*Client) PhysicalDomainVlanPoolGet

func (c *Client) PhysicalDomainVlanPoolGet(name string) (string, error)

PhysicalDomainVlanPoolGet retrieves the VLAN pool for the physical domain.

func (*Client) Refresh

func (c *Client) Refresh() error

Refresh resets the session timer on APIC using the API aaaRefresh. In order to keep the session active, Refresh() must be called at a period lower than the timeout reported by RefreshTimeout().

func (*Client) RefreshDeadline

func (c *Client) RefreshDeadline() time.Time

RefreshDeadline gets the deadline for session timeout. In order to keep the session active, Refresh() must be called before that deadline.

func (*Client) RefreshTimeout

func (c *Client) RefreshTimeout() time.Duration

RefreshTimeout gets the session timeout reported by last API call to APIC. In order to keep the session active, Refresh() must be called at a period lower than the timeout reported by RefreshTimeout().

func (*Client) RemoteLocationAdd

func (c *Client) RemoteLocationAdd(location, host, protocol, remotePort, remotePath, username, password, descr string) error

RemoteLocationAdd creates a new remote location.

func (*Client) RemoteLocationDel

func (c *Client) RemoteLocationDel(location string) error

RemoteLocationDel deletes an existing remote location.

func (*Client) RemoteLocationList

func (c *Client) RemoteLocationList() ([]map[string]interface{}, error)

RemoteLocationList retrieves the list of remote locations.

func (*Client) SubjectApplyBothDirections

func (c *Client) SubjectApplyBothDirections(tenant, contract, subject string) (bool, error)

SubjectApplyBothDirections reports whether the subject applies its filters to both directions.

func (*Client) SubjectFilterBothAdd

func (c *Client) SubjectFilterBothAdd(tenant, contract, subject, filter string) error

SubjectFilterBothAdd attaches a filter to subject. This type of filter is applied to both directions.

func (*Client) SubjectFilterBothDel

func (c *Client) SubjectFilterBothDel(tenant, contract, subject, filter string) error

SubjectFilterBothDel detaches a filter from subject. This type of filter is applied to both directions.

func (*Client) SubjectFilterBothList

func (c *Client) SubjectFilterBothList(tenant, contract, subject string) ([]map[string]interface{}, error)

SubjectFilterBothList retrieves the list of filters attached to subject. These filters are applied to both directions.

func (*Client) SubjectFilterInputAdd

func (c *Client) SubjectFilterInputAdd(tenant, contract, subject, filter string) error

SubjectFilterInputAdd attaches an input filter to subject.

func (*Client) SubjectFilterInputDel

func (c *Client) SubjectFilterInputDel(tenant, contract, subject, filter string) error

SubjectFilterInputDel detaches an input filter from subject.

func (*Client) SubjectFilterInputList

func (c *Client) SubjectFilterInputList(tenant, contract, subject string) ([]map[string]interface{}, error)

SubjectFilterInputList retrieves the list of input filters attached to subject.

func (*Client) SubjectFilterOutputAdd

func (c *Client) SubjectFilterOutputAdd(tenant, contract, subject, filter string) error

SubjectFilterOutputAdd attaches an output filter to subject.

func (*Client) SubjectFilterOutputDel

func (c *Client) SubjectFilterOutputDel(tenant, contract, subject, filter string) error

SubjectFilterOutputDel detaches an output filter from subject.

func (*Client) SubjectFilterOutputList

func (c *Client) SubjectFilterOutputList(tenant, contract, subject string) ([]map[string]interface{}, error)

SubjectFilterOutputList retrieves the list of output filters attached to subject.

func (*Client) TenantAdd

func (c *Client) TenantAdd(name, descr string) error

TenantAdd creates a new tenant.

func (*Client) TenantDel

func (c *Client) TenantDel(name string) error

TenantDel deletes an existing tenant.

func (*Client) TenantList

func (c *Client) TenantList() ([]map[string]interface{}, error)

TenantList retrieves the list of tenants.

func (*Client) TenantSubscribe

func (c *Client) TenantSubscribe() (string, error)

TenantSubscribe subscribes to tenant notifications. The subscriptionId is returned.

func (*Client) TenantSubscriptionRefresh

func (c *Client) TenantSubscriptionRefresh(subscriptionId string) error

TenantSubscriptionRefresh refreshes a subscription. In order to keep the subscription active, TenantSubscriptionRefresh() must be called at a period lower than the timeout reported by TenantSubscriptionTimeout().

func (*Client) TenantSubscriptionTimeout

func (c *Client) TenantSubscriptionTimeout() time.Duration

TenantSubscriptionTimeout gets the subscription timeout. In order to keep the subscription active, TenantSubscriptionRefresh() must be called at a period lower than the timeout reported by TenantSubscriptionTimeout().

func (*Client) VlanPoolAdd

func (c *Client) VlanPoolAdd(name, mode, descr string) error

VlanPoolAdd creates a new VLAN pool.

func (*Client) VlanPoolDel

func (c *Client) VlanPoolDel(name, mode string) error

VlanPoolDel deletes an existing VLAN pool.

func (*Client) VlanPoolList

func (c *Client) VlanPoolList() ([]map[string]interface{}, error)

VlanPoolList retrieves the list of VLAN pools.

func (*Client) VlanRangeAdd

func (c *Client) VlanRangeAdd(vlanpoolName, vlanpoolMode, from, to string) error

VlanRangeAdd creates a new VLAN range for a VLAN pool.

func (*Client) VlanRangeDel

func (c *Client) VlanRangeDel(vlanpoolName, vlanpoolMode, from, to string) error

VlanRangeDel deletes an existing VLAN range from a VLAN pool.

func (*Client) VlanRangeList

func (c *Client) VlanRangeList(vlanpoolName, vlanpoolMode string) ([]map[string]interface{}, error)

VlanRangeList retrieves the list of VLAN ranges from a VLAN pool.

func (*Client) VmmDomainVMWareAdd

func (c *Client) VmmDomainVMWareAdd(domain string) error

VmmDomainVMWareAdd creates a VMWare VMM Domain.

func (*Client) VmmDomainVMWareControllerAdd

func (c *Client) VmmDomainVMWareControllerAdd(domain, controller, credentials, hostname, datacenter string) error

VmmDomainVMWareControllerAdd creates controller for VMWare VMM Domain.

func (*Client) VmmDomainVMWareControllerCredentialsGet

func (c *Client) VmmDomainVMWareControllerCredentialsGet(domain, controller string) (string, error)

VmmDomainVMWareControllerCredentialsGet retrieves controller credentials.

func (*Client) VmmDomainVMWareControllerDel

func (c *Client) VmmDomainVMWareControllerDel(domain, controller string) error

VmmDomainVMWareControllerDel deletes controller from VMWare VMM Domain.

func (*Client) VmmDomainVMWareControllerList

func (c *Client) VmmDomainVMWareControllerList(domain string) ([]map[string]interface{}, error)

VmmDomainVMWareControllerList retrieves the list of controllers in VMWare VMM Domain.

func (*Client) VmmDomainVMWareCredentialsAdd

func (c *Client) VmmDomainVMWareCredentialsAdd(domain, credentials, descr, user, password string) error

VmmDomainVMWareCredentialsAdd creates vCenter Credentials for VMWare VMM Domain.

func (*Client) VmmDomainVMWareCredentialsDel

func (c *Client) VmmDomainVMWareCredentialsDel(domain, credentials string) error

VmmDomainVMWareCredentialsDel deletes vCenter Credentials from VMWare VMM Domain.

func (*Client) VmmDomainVMWareCredentialsList

func (c *Client) VmmDomainVMWareCredentialsList(domain string) ([]map[string]interface{}, error)

VmmDomainVMWareCredentialsList retrieves the list of vCenter Credentials in VMWare VMM Domain.

func (*Client) VmmDomainVMWareDel

func (c *Client) VmmDomainVMWareDel(domain string) error

VmmDomainVMWareDel deletes a VMWare VMM Domain.

func (*Client) VmmDomainVMWareList

func (c *Client) VmmDomainVMWareList() ([]map[string]interface{}, error)

VmmDomainVMWareList retrieves the list of VMWare VMM Domains.

func (*Client) VmmDomainVMWareVlanPoolGet

func (c *Client) VmmDomainVMWareVlanPoolGet(domain string) (string, string, error)

VmmDomainVMWareVlanPoolGet retrieves the VLAN pool for the VMWare VMM domain.

func (*Client) VmmDomainVMWareVlanPoolSet

func (c *Client) VmmDomainVMWareVlanPoolSet(domain, vlanpool, vlanpoolMode string) error

VmmDomainVMWareVlanPoolSet sets the VLAN pool for the VMWare VMM domain.

func (*Client) VrfAdd

func (c *Client) VrfAdd(tenant, vrf, descr string) error

VrfAdd creates a new VRF in a tenant.

func (*Client) VrfDel

func (c *Client) VrfDel(tenant, vrf string) error

VrfDel deletes an existing VRF from a tenant.

func (*Client) VrfList

func (c *Client) VrfList(tenant string) ([]map[string]interface{}, error)

VrfList retrieves the list of VRFs from a tenant.

func (*Client) VrfSetEnforcedMode

func (c *Client) VrfSetEnforcedMode(tenant, vrf string, enforced bool) error

VrfSetEnforcedMode sets the VRF enforced mode flag

func (*Client) WebsocketOpen

func (c *Client) WebsocketOpen() error

WebsocketOpen opens websocket for receiving subscription information.

func (*Client) WebsocketReadJSON

func (c *Client) WebsocketReadJSON(v interface{}) error

WebsocketReadJSON reads subscription message from websocket.

type ClientOptions

type ClientOptions struct {
	Hosts []string // List of apic hostnames. If unspecified, env var APIC_HOSTS is used.
	User  string   // Username. If unspecified, env var APIC_USER is used.
	Pass  string   // Password. If unspecified, env var APIC_PASS is used.
	Debug bool     // Debug enables verbose debugging messages to console.
}

ClientOptions is used to specify options for the Client.

Jump to

Keyboard shortcuts

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