Documentation
¶
Overview ¶
Package aci is a Go module for interacting with Cisco ACI using API calls.
Example
package main import ( "fmt" "github.com/kcbark/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
- type Client
- func (c *Client) ApplicationEPGAdd(tenant, applicationProfile, bridgeDomain, epg, descr string) error
- func (c *Client) ApplicationEPGBDList(tenant, applicationProfile, applicationEpg string) ([]map[string]interface{}, error)
- func (c *Client) ApplicationEPGDel(tenant, applicationProfile, epg string) error
- func (c *Client) ApplicationEPGDomainList(tenant, applicationProfile, applicationEpg string) ([]map[string]interface{}, error)
- func (c *Client) ApplicationEPGList(tenant, applicationProfile string) ([]map[string]interface{}, error)
- func (c *Client) ApplicationProfileAdd(tenant, name, descr string) error
- func (c *Client) ApplicationProfileDel(tenant, name string) error
- func (c *Client) ApplicationProfileList(tenant string) ([]map[string]interface{}, error)
- func (c *Client) AttachableAccessEntityProfileAdd(aep, descr string) error
- func (c *Client) AttachableAccessEntityProfileDel(aep string) error
- func (c *Client) AttachableAccessEntityProfileDomainL2Add(aep, l2dom string) error
- func (c *Client) AttachableAccessEntityProfileDomainL2Del(aep, l2dom string) error
- func (c *Client) AttachableAccessEntityProfileDomainL3Add(aep, l3dom string) error
- func (c *Client) AttachableAccessEntityProfileDomainL3Del(aep, l3dom string) error
- func (c *Client) AttachableAccessEntityProfileDomainList(aep string) ([]map[string]interface{}, error)
- func (c *Client) AttachableAccessEntityProfileDomainVmmVMWareAdd(aep, domainVMWare string) error
- func (c *Client) AttachableAccessEntityProfileDomainVmmVMWareDel(aep, domainVMWare string) error
- func (c *Client) AttachableAccessEntityProfileList() ([]map[string]interface{}, error)
- func (c *Client) BridgeDomainAdd(tenant, bd, descr, namealias string) error
- func (c *Client) BridgeDomainDel(tenant, bd string) error
- func (c *Client) BridgeDomainL3ExtOutAdd(tenant, bd, out string) error
- func (c *Client) BridgeDomainL3ExtOutDel(tenant, bd, out string) error
- func (c *Client) BridgeDomainL3ExtOutList(tenant, bd string) ([]map[string]interface{}, error)
- func (c *Client) BridgeDomainList(tenant string) ([]map[string]interface{}, error)
- func (c *Client) BridgeDomainSetAdvertiseHostRoutes(tenant, bd string, enabled bool) error
- func (c *Client) BridgeDomainSetArpFlood(tenant, bd string, enabled bool) error
- func (c *Client) BridgeDomainSetUnicastRouting(tenant, bd string, enabled bool) error
- func (c *Client) BridgeDomainSubnetAdd(tenant, bd, subnet, descr string) error
- func (c *Client) BridgeDomainSubnetDel(tenant, bd, subnet string) error
- func (c *Client) BridgeDomainSubnetGet(tenant, bd, subnet string) ([]map[string]interface{}, error)
- func (c *Client) BridgeDomainSubnetList(tenant, bd string) ([]map[string]interface{}, error)
- func (c *Client) BridgeDomainSubnetPrimarySet(tenant, bd, subnet string, enabled bool) error
- func (c *Client) BridgeDomainSubnetScopeGet(tenant, bd, subnet string) (string, error)
- func (c *Client) BridgeDomainSubnetScopeSet(tenant, bd, subnet, scope string) error
- func (c *Client) BridgeDomainSubnetVirtualSet(tenant, bd, subnet string, enabled bool) error
- func (c *Client) BridgeDomainUpdate(tenant, bd string, descr, namealias *string) error
- func (c *Client) BridgeDomainVrfGet(tenant, bd string) (string, error)
- func (c *Client) BridgeDomainVrfSet(tenant, bd, vrf string) error
- func (c *Client) ContractAdd(tenant, contract, scope, descr string) error
- func (c *Client) ContractDel(tenant, contract string) error
- func (c *Client) ContractList(tenant string) ([]map[string]interface{}, error)
- func (c *Client) ContractSubjectAdd(tenant, contract, subject, reverseFilterPorts string, applyBothDirections bool, ...) error
- func (c *Client) ContractSubjectDel(tenant, contract, subject string) error
- func (c *Client) ContractSubjectList(tenant, contract string) ([]map[string]interface{}, error)
- func (c *Client) EPGContractConsumedAdd(tenant, applicationProfile, epg, contract string) error
- func (c *Client) EPGContractConsumedDel(tenant, applicationProfile, epg, contract string) error
- func (c *Client) EPGContractConsumedList(tenant, applicationProfile, epg string) ([]map[string]interface{}, error)
- func (c *Client) EPGContractProvidedAdd(tenant, applicationProfile, epg, contract string) error
- func (c *Client) EPGContractProvidedDel(tenant, applicationProfile, epg, contract string) error
- func (c *Client) EPGContractProvidedList(tenant, applicationProfile, epg string) ([]map[string]interface{}, error)
- func (c *Client) ExportConfigurationAdd(config, scheduler, remoteLocation, descr string) error
- func (c *Client) ExportConfigurationDel(config string) error
- func (c *Client) ExportConfigurationList() ([]map[string]interface{}, error)
- func (c *Client) ExportConfigurationRemoteLocationGet(config string) (map[string]interface{}, error)
- func (c *Client) ExportConfigurationRun(config string) error
- func (c *Client) ExportConfigurationSchedulerGet(config string) (map[string]interface{}, error)
- func (c *Client) ExternalRoutedDomainAdd(dom, nameAlias string) error
- func (c *Client) ExternalRoutedDomainDel(dom string) error
- func (c *Client) ExternalRoutedDomainList() ([]map[string]interface{}, error)
- func (c *Client) ExternalRoutedDomainVlanPoolGet(name string) (string, error)
- func (c *Client) FaultList() ([]map[string]interface{}, error)
- func (c *Client) FilterAdd(tenant, filter, descr string) error
- func (c *Client) FilterDel(tenant, filter string) error
- func (c *Client) FilterEntryAdd(...) error
- func (c *Client) FilterEntryDel(tenant, filter, entry string) error
- func (c *Client) FilterEntryList(tenant, filter string) ([]map[string]interface{}, error)
- func (c *Client) FilterList(tenant string) ([]map[string]interface{}, error)
- func (c *Client) L3ExtOutAdd(tenant, out, descr string) error
- func (c *Client) L3ExtOutDel(tenant, out string) error
- func (c *Client) L3ExtOutL3ExtDomainGet(tenant, out string) (string, error)
- func (c *Client) L3ExtOutL3ExtDomainSet(tenant, out, domain string) error
- func (c *Client) L3ExtOutList(tenant string) ([]map[string]interface{}, error)
- func (c *Client) L3ExtOutVrfGet(tenant, out string) (string, error)
- func (c *Client) L3ExtOutVrfSet(tenant, out, vrf string) error
- func (c *Client) LeafInterfacePolicyGroupAdd(group, descr string) error
- func (c *Client) LeafInterfacePolicyGroupDel(group string) error
- func (c *Client) LeafInterfacePolicyGroupEntityGet(group string) (string, error)
- func (c *Client) LeafInterfacePolicyGroupEntitySet(group, aep string) error
- func (c *Client) LeafInterfacePolicyGroupList() ([]map[string]interface{}, error)
- func (c *Client) Login() error
- func (c *Client) Logout() error
- func (c *Client) NodeAdd(name, ID, serial string) error
- func (c *Client) NodeDel(serial string) error
- func (c *Client) NodeList() ([]map[string]interface{}, error)
- func (c *Client) PhysicalDomainAdd(name, nameAlias string) error
- func (c *Client) PhysicalDomainDel(name string) error
- func (c *Client) PhysicalDomainList() ([]map[string]interface{}, error)
- func (c *Client) PhysicalDomainVlanPoolGet(name string) (string, error)
- func (c *Client) PhysicalDomainVlanPoolSet(domain, vlanpool, vlanpoolMode string) error
- func (c *Client) Refresh() error
- func (c *Client) RefreshDeadline() time.Time
- func (c *Client) RefreshTimeout() time.Duration
- func (c *Client) RemoteLocationAdd(...) error
- func (c *Client) RemoteLocationDel(location string) error
- func (c *Client) RemoteLocationList() ([]map[string]interface{}, error)
- func (c *Client) SubjectApplyBothDirections(tenant, contract, subject string) (bool, error)
- func (c *Client) SubjectFilterBothAdd(tenant, contract, subject, filter string) error
- func (c *Client) SubjectFilterBothDel(tenant, contract, subject, filter string) error
- func (c *Client) SubjectFilterBothList(tenant, contract, subject string) ([]map[string]interface{}, error)
- func (c *Client) SubjectFilterInputAdd(tenant, contract, subject, filter string) error
- func (c *Client) SubjectFilterInputDel(tenant, contract, subject, filter string) error
- func (c *Client) SubjectFilterInputList(tenant, contract, subject string) ([]map[string]interface{}, error)
- func (c *Client) SubjectFilterOutputAdd(tenant, contract, subject, filter string) error
- func (c *Client) SubjectFilterOutputDel(tenant, contract, subject, filter string) error
- func (c *Client) SubjectFilterOutputList(tenant, contract, subject string) ([]map[string]interface{}, error)
- func (c *Client) TenantAdd(name, descr, namealias, annotation string) error
- func (c *Client) TenantDel(name string) error
- func (c *Client) TenantList() ([]map[string]interface{}, error)
- func (c *Client) TenantSubscribe() (string, error)
- func (c *Client) TenantSubscriptionRefresh(subscriptionId string) error
- func (c *Client) TenantSubscriptionTimeout() time.Duration
- func (c *Client) TenantUpdate(name, descr, namealias string) error
- func (c *Client) VlanPoolAdd(name, mode, descr string) error
- func (c *Client) VlanPoolDel(name, mode string) error
- func (c *Client) VlanPoolList() ([]map[string]interface{}, error)
- func (c *Client) VlanRangeAdd(vlanpoolName, vlanpoolMode, from, to string) error
- func (c *Client) VlanRangeDel(vlanpoolName, vlanpoolMode, from, to string) error
- func (c *Client) VlanRangeList(vlanpoolName, vlanpoolMode string) ([]map[string]interface{}, error)
- func (c *Client) VmmDomainVMWareAdd(domain string) error
- func (c *Client) VmmDomainVMWareControllerAdd(domain, controller, credentials, hostname, datacenter string) error
- func (c *Client) VmmDomainVMWareControllerCredentialsGet(domain, controller string) (string, error)
- func (c *Client) VmmDomainVMWareControllerDel(domain, controller string) error
- func (c *Client) VmmDomainVMWareControllerList(domain string) ([]map[string]interface{}, error)
- func (c *Client) VmmDomainVMWareCredentialsAdd(domain, credentials, descr, user, password string) error
- func (c *Client) VmmDomainVMWareCredentialsDel(domain, credentials string) error
- func (c *Client) VmmDomainVMWareCredentialsList(domain string) ([]map[string]interface{}, error)
- func (c *Client) VmmDomainVMWareDel(domain string) error
- func (c *Client) VmmDomainVMWareList() ([]map[string]interface{}, error)
- func (c *Client) VmmDomainVMWareVlanPoolGet(domain string) (string, string, error)
- func (c *Client) VmmDomainVMWareVlanPoolSet(domain, vlanpool, vlanpoolMode string) error
- func (c *Client) VrfAdd(tenant, vrf, descr, namealias string) error
- func (c *Client) VrfDel(tenant, vrf string) error
- func (c *Client) VrfList(tenant string) ([]map[string]interface{}, error)
- func (c *Client) VrfSetEnforcedMode(tenant, vrf string, enforced bool) error
- func (c *Client) VrfUpdate(tenant, vrf, descr, namealias string) error
- func (c *Client) WebsocketOpen() error
- func (c *Client) WebsocketReadJSON(v interface{}) error
- type ClientOptions
Constants ¶
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) ApplicationEPGBDList ¶
func (c *Client) ApplicationEPGBDList(tenant, applicationProfile, applicationEpg string) ([]map[string]interface{}, error)
ApplicationEPGBDList retrieves the application EPG in an application profile.
func (*Client) ApplicationEPGDel ¶
ApplicationEPGDel deletes an existing application EPG from an application profile.
func (*Client) ApplicationEPGDomainList ¶
func (c *Client) ApplicationEPGDomainList(tenant, applicationProfile, applicationEpg string) ([]map[string]interface{}, error)
ApplicationEPGPhysicalDomainList retrieves the physical domains configured on the EPG
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 ¶
ApplicationProfileAdd creates a new application profile in a tenant.
func (*Client) ApplicationProfileDel ¶
ApplicationProfileDel deletes an existing application profile from a tenant.
func (*Client) ApplicationProfileList ¶
ApplicationProfileList retrieves application profiles from a tenant.
func (*Client) AttachableAccessEntityProfileAdd ¶
AttachableAccessEntityProfileAdd creates an AAEP.
func (*Client) AttachableAccessEntityProfileDel ¶
AttachableAccessEntityProfileDel deletes an AAEP.
func (*Client) AttachableAccessEntityProfileDomainL2Add ¶
AttachableAccessEntityProfileDomainL2Add attaches an L2 Domain to the AAEP.
func (*Client) AttachableAccessEntityProfileDomainL2Del ¶
AttachableAccessEntityProfileDomainL2Del detaches an L2 Domain from the AAEP.
func (*Client) AttachableAccessEntityProfileDomainL3Add ¶
AttachableAccessEntityProfileDomainL3Add attaches an L3 Domain to the AAEP.
func (*Client) AttachableAccessEntityProfileDomainL3Del ¶
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 ¶
AttachableAccessEntityProfileDomainVmmVMWareAdd attaches a VMM VMWare Domain to the AAEP.
func (*Client) AttachableAccessEntityProfileDomainVmmVMWareDel ¶
AttachableAccessEntityProfileDomainVmmVMWareDel detaches a VMM VMWare Domain from the AAEP.
func (*Client) AttachableAccessEntityProfileList ¶
AttachableAccessEntityProfileList retrieves the list of AAEPs.
func (*Client) BridgeDomainAdd ¶
BridgeDomainAdd creates a new bridge domain in a tenant.
func (*Client) BridgeDomainDel ¶
BridgeDomainDel deletes an existing bridge domain from a tenant.
func (*Client) BridgeDomainL3ExtOutAdd ¶
BridgeDomainL3ExtOutAdd attaches a new L3 External Outside in a bridge domain.
func (*Client) BridgeDomainL3ExtOutDel ¶
BridgeDomainL3ExtOutDel detaches an existing L3 External Outside from a bridge domain.
func (*Client) BridgeDomainL3ExtOutList ¶
BridgeDomainL3ExtOutList retrieves the list of L3 External Outsides attached to a bridge domain.
func (*Client) BridgeDomainList ¶
BridgeDomainList retrieves the list of bridge domains from a tenant.
func (*Client) BridgeDomainSetAdvertiseHostRoutes ¶
BridgeDomainSetUnicastRouting sets or clears the "Enable Host Based Routing" flag
func (*Client) BridgeDomainSetArpFlood ¶
BridgeDomainSetUnicastRouting sets or clears the "Enable ARP flood" flag
func (*Client) BridgeDomainSetUnicastRouting ¶
BridgeDomainSetUnicastRouting sets or clears the "Enable unicast routing" flag
func (*Client) BridgeDomainSubnetAdd ¶
BridgeDomainSubnetAdd creates a new subnet in a bridge domain.
func (*Client) BridgeDomainSubnetDel ¶
BridgeDomainSubnetDel deletes an existing subnet from a bridge domain.
func (*Client) BridgeDomainSubnetGet ¶
BridgeDomainSubnetGet retrieves specific subnet from a bridge domain.
func (*Client) BridgeDomainSubnetList ¶
BridgeDomainSubnetList retrieves the list of subnets from a bridge domain.
func (*Client) BridgeDomainSubnetPrimarySet ¶
BridgeDomainSubnetPrimarySet ip to primary / preferred for a bridge domain subnet.
func (*Client) BridgeDomainSubnetScopeGet ¶
BridgeDomainSubnetScopeGet retrieves the scope from a bridge domain subnet.
func (*Client) BridgeDomainSubnetScopeSet ¶
BridgeDomainSubnetScopeSet defines the scope for a bridge domain subnet.
func (*Client) BridgeDomainSubnetVirtualSet ¶
BridgeDomainSubnetVirtualSet set virtual ip for a bridge domain subnet.
func (*Client) BridgeDomainUpdate ¶
BridgeDomainUpdate update existing bridge domain in a tenant.
func (*Client) BridgeDomainVrfGet ¶
BridgeDomainVrfGet retrieves the VRF for a bridge domain.
func (*Client) BridgeDomainVrfSet ¶
BridgeDomainVrfSet defines the VRF for a bridge domain.
func (*Client) ContractAdd ¶
ContractAdd creates a new contract.
func (*Client) ContractDel ¶
ContractDel deletes an existing contract.
func (*Client) ContractList ¶
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 ¶
ContractSubjectDel deletes an existing subject.
func (*Client) ContractSubjectList ¶
ContractSubjectList retrieves the list of subjects.
func (*Client) EPGContractConsumedAdd ¶
EPGContractConsumedAdd attaches contract as consumed by EPG.
func (*Client) EPGContractConsumedDel ¶
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 ¶
EPGContractProvidedAdd attaches contract as provided by EPG.
func (*Client) EPGContractProvidedDel ¶
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 ¶
ExportConfigurationAdd creates a new export configuration.
func (*Client) ExportConfigurationDel ¶
ExportConfigurationDel deletes an existing export configuration.
func (*Client) ExportConfigurationList ¶
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 ¶
ExportConfigurationRun executes the export configuration now.
func (*Client) ExportConfigurationSchedulerGet ¶
ExportConfigurationSchedulerGet retrieves the scheduler attached to an export configuration.
func (*Client) ExternalRoutedDomainAdd ¶
ExternalRoutedDomainAdd creates a new L3 External Domain.
func (*Client) ExternalRoutedDomainDel ¶
ExternalRoutedDomainDel deletes an existing L3 External Domain.
func (*Client) ExternalRoutedDomainList ¶
ExternalRoutedDomainList retrieves the list of L3 External Domains.
func (*Client) ExternalRoutedDomainVlanPoolGet ¶
ExternalRoutedDomainVlanPoolGet retrieves the VLAN pool for the l3 domain.
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 ¶
FilterEntryDel deletes an existing filter entry.
func (*Client) FilterEntryList ¶
FilterEntryList retrieves the list of filter entries.
func (*Client) FilterList ¶
FilterList retrieves the list of filters.
func (*Client) L3ExtOutAdd ¶
L3ExtOutAdd creates a new external routed network in a tenant.
func (*Client) L3ExtOutDel ¶
L3ExtOutDel deletes an external routed network from a tenant.
func (*Client) L3ExtOutL3ExtDomainGet ¶
L3ExtOutL3ExtDomainGet retrieves the external routed domain for an external routed network.
func (*Client) L3ExtOutL3ExtDomainSet ¶
L3ExtOutL3ExtDomainSet defines the external routed domain for an external routed network.
func (*Client) L3ExtOutList ¶
L3ExtOutList retrieves the list of external routed networks from a tenant.
func (*Client) L3ExtOutVrfGet ¶
L3ExtOutVrfGet retrieves the VRF for an external routed network.
func (*Client) L3ExtOutVrfSet ¶
L3ExtOutVrfSet defines the VRF for an external routed network.
func (*Client) LeafInterfacePolicyGroupAdd ¶
LeafInterfacePolicyGroupAdd creates a policy group for leaf access ports.
func (*Client) LeafInterfacePolicyGroupDel ¶
LeafInterfacePolicyGroupDel deletes a policy group for leaf access ports.
func (*Client) LeafInterfacePolicyGroupEntityGet ¶
LeafInterfacePolicyGroupEntityGet gets the AAEP attached to the leaf interface policy group.
func (*Client) LeafInterfacePolicyGroupEntitySet ¶
LeafInterfacePolicyGroupEntitySet attaches an AAEP to the leaf interface policy group.
func (*Client) LeafInterfacePolicyGroupList ¶
LeafInterfacePolicyGroupList retrieves the list of policy groups for leaf access ports.
func (*Client) NodeList ¶
NodeList retrieves the list of top level system elements (APICs, spines, leaves).
func (*Client) PhysicalDomainAdd ¶
PhysicalDomainAdd creates a new physical domain.
func (*Client) PhysicalDomainDel ¶
PhysicalDomainDel deletes an existing physical domain.
func (*Client) PhysicalDomainList ¶
PhysicalDomainList retrieves the list of physical domains.
func (*Client) PhysicalDomainVlanPoolGet ¶
PhysicalDomainVlanPoolGet retrieves the VLAN pool for the physical domain.
func (*Client) PhysicalDomainVlanPoolSet ¶
PhysicalDomainVlanPoolSet sets the VLAN pool for the physical domain.
func (*Client) Refresh ¶
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 ¶
RefreshDeadline gets the deadline for session timeout. In order to keep the session active, Refresh() must be called before that deadline.
func (*Client) RefreshTimeout ¶
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 ¶
RemoteLocationDel deletes an existing remote location.
func (*Client) RemoteLocationList ¶
RemoteLocationList retrieves the list of remote locations.
func (*Client) SubjectApplyBothDirections ¶
SubjectApplyBothDirections reports whether the subject applies its filters to both directions.
func (*Client) SubjectFilterBothAdd ¶
SubjectFilterBothAdd attaches a filter to subject. This type of filter is applied to both directions.
func (*Client) SubjectFilterBothDel ¶
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 ¶
SubjectFilterInputAdd attaches an input filter to subject.
func (*Client) SubjectFilterInputDel ¶
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 ¶
SubjectFilterOutputAdd attaches an output filter to subject.
func (*Client) SubjectFilterOutputDel ¶
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) TenantList ¶
TenantList retrieves the list of tenants.
func (*Client) TenantSubscribe ¶
TenantSubscribe subscribes to tenant notifications. The subscriptionId is returned.
func (*Client) TenantSubscriptionRefresh ¶
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 ¶
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) TenantUpdate ¶
TenantUpdate creates a new tenant.
func (*Client) VlanPoolAdd ¶
VlanPoolAdd creates a new VLAN pool.
func (*Client) VlanPoolDel ¶
VlanPoolDel deletes an existing VLAN pool.
func (*Client) VlanPoolList ¶
VlanPoolList retrieves the list of VLAN pools.
func (*Client) VlanRangeAdd ¶
VlanRangeAdd creates a new VLAN range for a VLAN pool.
func (*Client) VlanRangeDel ¶
VlanRangeDel deletes an existing VLAN range from a VLAN pool.
func (*Client) VlanRangeList ¶
VlanRangeList retrieves the list of VLAN ranges from a VLAN pool.
func (*Client) VmmDomainVMWareAdd ¶
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 ¶
VmmDomainVMWareControllerCredentialsGet retrieves controller credentials.
func (*Client) VmmDomainVMWareControllerDel ¶
VmmDomainVMWareControllerDel deletes controller from VMWare VMM Domain.
func (*Client) VmmDomainVMWareControllerList ¶
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 ¶
VmmDomainVMWareCredentialsDel deletes vCenter Credentials from VMWare VMM Domain.
func (*Client) VmmDomainVMWareCredentialsList ¶
VmmDomainVMWareCredentialsList retrieves the list of vCenter Credentials in VMWare VMM Domain.
func (*Client) VmmDomainVMWareDel ¶
VmmDomainVMWareDel deletes a VMWare VMM Domain.
func (*Client) VmmDomainVMWareList ¶
VmmDomainVMWareList retrieves the list of VMWare VMM Domains.
func (*Client) VmmDomainVMWareVlanPoolGet ¶
VmmDomainVMWareVlanPoolGet retrieves the VLAN pool for the VMWare VMM domain.
func (*Client) VmmDomainVMWareVlanPoolSet ¶
VmmDomainVMWareVlanPoolSet sets the VLAN pool for the VMWare VMM domain.
func (*Client) VrfSetEnforcedMode ¶
VrfSetEnforcedMode sets the VRF enforced mode flag
func (*Client) WebsocketOpen ¶
WebsocketOpen opens websocket for receiving subscription information.
func (*Client) WebsocketReadJSON ¶
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.
Source Files
¶
- aaep.go
- aaep_l2.go
- aaep_l3.go
- aaep_vmm_vmware.go
- aci.go
- ap.go
- bd.go
- bd_l3_ext_out.go
- contract.go
- contract_subject.go
- doc.go
- domain_l2ext.go
- domain_l3ext.go
- domain_phy.go
- epg_app.go
- epg_contract.go
- export_config.go
- fault.go
- filter.go
- filter_entry.go
- imdata.go
- json.go
- l3_ext_out.go
- leaf_port_group.go
- node.go
- remote_location.go
- subject.go
- tenant.go
- vlanpool.go
- vlanrange.go
- vmm_vmware.go
- vmm_vmware_controller.go
- vmm_vmware_cred.go
- vrf.go
- websocket.go