Documentation ¶
Index ¶
- func CheckForErrors(cont *container.Container, method string) error
- func GetObjectNameByUUID(objectRef string, objectCont *container.Container) (string, bool)
- func GetObjectUUIDByName(objectName string, objectCont *container.Container) (string, bool)
- func StrtoInt(s string, startIndex int, bitSize int) (int64, error)
- type Auth
- type Client
- func (c *Client) Authenticate() error
- func (c *Client) CompareVersion(v string) (int, error)
- func (client *Client) CreateAnpEpgUsegAttr(obj *models.SiteUsegAttr) error
- func (client *Client) CreateDHCPOptionPolicy(obj *models.DHCPOptionPolicy) (*container.Container, error)
- func (client *Client) CreateDHCPOptionPolicyOption(obj *models.DHCPOptionPolicyOption) error
- func (client *Client) CreateDHCPRelayPolicy(obj *models.DHCPRelayPolicy) (*container.Container, error)
- func (client *Client) CreateDHCPRelayPolicyProvider(obj *models.DHCPRelayPolicyProvider) error
- func (client *Client) CreateInterSchemaSiteVrfRegionHubNetwork(obj *models.InterSchemaSiteVrfRegionHubNetork) error
- func (client *Client) CreateIntersiteL3outs(obj *models.IntersiteL3outs) error
- func (client *Client) CreateTemplateBDDHCPPolicy(obj *models.TemplateBDDHCPPolicy) (*container.Container, error)
- func (client *Client) DeleteAnpEpgUsegAttr(obj *models.SiteUsegAttr) error
- func (client *Client) DeleteDHCPOptionPolicy(id string) error
- func (client *Client) DeleteDHCPOptionPolicyOption(id string) error
- func (client *Client) DeleteDHCPRelayPolicy(id string) error
- func (client *Client) DeleteDHCPRelayPolicyProvider(obj *models.DHCPRelayPolicyProvider) error
- func (client *Client) DeleteInterSchemaSiteVrfRegionHubNetwork(obj *models.InterSchemaSiteVrfRegionHubNetork) error
- func (client *Client) DeleteIntersiteL3outs(obj *models.IntersiteL3outs) error
- func (client *Client) DeleteTemplateBDDHCPPolicy(obj *models.TemplateBDDHCPPolicy) (*container.Container, error)
- func (c *Client) DeletebyId(url string) error
- func (c *Client) Do(req *http.Request) (*container.Container, *http.Response, error)
- func (client *Client) GetDHCPOptionPolicyID(name string) (string, error)
- func (client *Client) GetDHCPPoliciesNameByUUID(tenantID string, objectRefs []interface{}) ([]interface{}, error)
- func (client *Client) GetDHCPPoliciesUUIDByName(tenantID string, objectNames []interface{}) ([]interface{}, error)
- func (client *Client) GetDHCPRelayPolicyID(name string) (string, error)
- func (c *Client) GetDomainId(domain string) (string, error)
- func (c *Client) GetPlatform() string
- func (client *Client) GetPoliciesByTenantID(objectType, tenantID string) (*container.Container, error)
- func (client *Client) GetPolicyByTenantID(objectType, objectName, tenantID string) (map[string]interface{}, error)
- func (c *Client) GetSchemaValidate(endpoint string) (*container.Container, error)
- func (client *Client) GetTenantIDFromSchemaTemplate(schemaID, templateName string) (string, error)
- func (c *Client) GetVersion() (string, error)
- func (c *Client) GetViaURL(endpoint string) (*container.Container, error)
- func (client *Client) InjectAuthenticationHeader(req *http.Request, path string) (*http.Request, error)
- func (c *Client) MakeRestRequest(method string, path string, body *container.Container, authenticated bool) (*http.Request, error)
- func (c *Client) PatchbyID(endpoint string, objList ...models.Model) (*container.Container, error)
- func (c *Client) PrepareModel(obj models.Model) (*container.Container, error)
- func (c *Client) Put(endpoint string, obj models.Model) (*container.Container, error)
- func (client *Client) ReadAnpEpgUsegAttr(obj *models.SiteUsegAttr) (*models.SiteUsegAttr, int, error)
- func (client *Client) ReadDHCPOptionPolicy(id string) (*container.Container, error)
- func (client *Client) ReadDHCPOptionPolicyOption(id string) (*models.DHCPOptionPolicyOption, error)
- func (client *Client) ReadDHCPRelayPolicy(id string) (*container.Container, error)
- func (client *Client) ReadDHCPRelayPolicyProvider(obj *models.DHCPRelayPolicyProvider) (*models.DHCPRelayPolicyProvider, error)
- func (client *Client) ReadInterSchemaSiteVrfRegionHubNetwork(obj *models.InterSchemaSiteVrfRegionHubNetork) (*models.InterSchemaSiteVrfRegionHubNetork, error)
- func (client *Client) ReadIntersiteL3outs(obj *models.IntersiteL3outs) (*models.IntersiteL3outs, error)
- func (client *Client) ReadSchemaValidate(obj *models.SchemValidate) (*models.SchemValidate, error)
- func (client *Client) ReadTemplateBDDHCPPolicy(schemaID string) (*container.Container, error)
- func (c *Client) Save(endpoint string, obj models.Model) (*container.Container, error)
- func (client *Client) UpdateAnpEpgUsegAttr(obj *models.SiteUsegAttr) error
- func (client *Client) UpdateDHCPOptionPolicy(id string, obj *models.DHCPOptionPolicy) (*container.Container, error)
- func (client *Client) UpdateDHCPOptionPolicyOption(obj *models.DHCPOptionPolicyOption) error
- func (client *Client) UpdateDHCPRelayPolicy(id string, obj *models.DHCPRelayPolicy) (*container.Container, error)
- func (client *Client) UpdateDHCPRelayPolicyProvider(new *models.DHCPRelayPolicyProvider, old *models.DHCPRelayPolicyProvider) error
- func (client *Client) UpdateTemplateBDDHCPPolicy(obj *models.TemplateBDDHCPPolicy) (*container.Container, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForErrors ¶
CheckForErrors parses the response and checks of there is an error attribute in the response
func GetObjectNameByUUID ¶ added in v1.19.0
GetObjectNameByUUID returns the name of an object given its UUID and boolean indicating whether the object was found or not.
func GetObjectUUIDByName ¶ added in v1.19.0
GetObjectUUIDByName returns the UUID of an object given its name and boolean indicating whether the object was found or not.
Types ¶
type Auth ¶
func (*Auth) CalculateExpiry ¶
type Client ¶
type Client struct { BaseURL *url.URL AuthToken *Auth Mutex sync.Mutex // contains filtered or unexported fields }
Client is the main entry point
func (*Client) CompareVersion ¶ added in v1.9.1
Compares the version to the retrieved version. This returns -1, 0, or 1 if this version is smaller, equal, or larger than the retrieved version, respectively.
func (*Client) CreateAnpEpgUsegAttr ¶ added in v1.3.8
func (client *Client) CreateAnpEpgUsegAttr(obj *models.SiteUsegAttr) error
func (*Client) CreateDHCPOptionPolicy ¶ added in v1.3.1
func (*Client) CreateDHCPOptionPolicyOption ¶ added in v1.3.1
func (client *Client) CreateDHCPOptionPolicyOption(obj *models.DHCPOptionPolicyOption) error
func (*Client) CreateDHCPRelayPolicy ¶ added in v1.3.1
func (*Client) CreateDHCPRelayPolicyProvider ¶ added in v1.3.1
func (client *Client) CreateDHCPRelayPolicyProvider(obj *models.DHCPRelayPolicyProvider) error
func (*Client) CreateInterSchemaSiteVrfRegionHubNetwork ¶ added in v1.3.1
func (client *Client) CreateInterSchemaSiteVrfRegionHubNetwork(obj *models.InterSchemaSiteVrfRegionHubNetork) error
func (*Client) CreateIntersiteL3outs ¶ added in v1.3.1
func (client *Client) CreateIntersiteL3outs(obj *models.IntersiteL3outs) error
func (*Client) CreateTemplateBDDHCPPolicy ¶ added in v1.3.1
func (*Client) DeleteAnpEpgUsegAttr ¶ added in v1.3.8
func (client *Client) DeleteAnpEpgUsegAttr(obj *models.SiteUsegAttr) error
func (*Client) DeleteDHCPOptionPolicy ¶ added in v1.3.1
func (*Client) DeleteDHCPOptionPolicyOption ¶ added in v1.3.1
func (*Client) DeleteDHCPRelayPolicy ¶ added in v1.3.1
func (*Client) DeleteDHCPRelayPolicyProvider ¶ added in v1.3.1
func (client *Client) DeleteDHCPRelayPolicyProvider(obj *models.DHCPRelayPolicyProvider) error
func (*Client) DeleteInterSchemaSiteVrfRegionHubNetwork ¶ added in v1.3.1
func (client *Client) DeleteInterSchemaSiteVrfRegionHubNetwork(obj *models.InterSchemaSiteVrfRegionHubNetork) error
func (*Client) DeleteIntersiteL3outs ¶ added in v1.3.1
func (client *Client) DeleteIntersiteL3outs(obj *models.IntersiteL3outs) error
func (*Client) DeleteTemplateBDDHCPPolicy ¶ added in v1.3.1
func (*Client) DeletebyId ¶
func (*Client) GetDHCPOptionPolicyID ¶ added in v1.3.1
func (*Client) GetDHCPPoliciesNameByUUID ¶ added in v1.19.0
func (client *Client) GetDHCPPoliciesNameByUUID(tenantID string, objectRefs []interface{}) ([]interface{}, error)
GetDHCPPoliciesNameByUUID retrieves the DHCP policies' names by UUID. It takes in the tenant ID and a list of object references as parameters. The function returns a list of interface{} and an error.
func (*Client) GetDHCPPoliciesUUIDByName ¶ added in v1.19.0
func (client *Client) GetDHCPPoliciesUUIDByName(tenantID string, objectNames []interface{}) ([]interface{}, error)
GetDHCPPoliciesUUIDByName retrieves the DHCP policies UUIDs by name for a given tenant ID.
Parameters: - tenantID: The ID of the tenant. - objectNames: An array of objects containing the relay name and option name.
func (*Client) GetDHCPRelayPolicyID ¶ added in v1.3.1
func (*Client) GetPlatform ¶
func (*Client) GetPoliciesByTenantID ¶ added in v1.19.0
func (client *Client) GetPoliciesByTenantID(objectType, tenantID string) (*container.Container, error)
GetPoliciesByTenantID returns the policies container object based on the tenant id.
func (*Client) GetPolicyByTenantID ¶ added in v1.19.0
func (client *Client) GetPolicyByTenantID(objectType, objectName, tenantID string) (map[string]interface{}, error)
GetPolicyByTenantID retrieves a policy based on the given object type, object name, and tenant ID.
func (*Client) GetSchemaValidate ¶ added in v1.3.1
func (*Client) GetTenantIDFromSchemaTemplate ¶ added in v1.19.0
GetTenantIDFromSchemaTemplate retrieves the Tenant ID from the schema template object.
func (*Client) GetVersion ¶ added in v1.9.1
func (*Client) InjectAuthenticationHeader ¶
func (*Client) MakeRestRequest ¶
func (*Client) PrepareModel ¶
func (*Client) ReadAnpEpgUsegAttr ¶ added in v1.3.8
func (client *Client) ReadAnpEpgUsegAttr(obj *models.SiteUsegAttr) (*models.SiteUsegAttr, int, error)
func (*Client) ReadDHCPOptionPolicy ¶ added in v1.3.1
func (*Client) ReadDHCPOptionPolicyOption ¶ added in v1.3.1
func (client *Client) ReadDHCPOptionPolicyOption(id string) (*models.DHCPOptionPolicyOption, error)
func (*Client) ReadDHCPRelayPolicy ¶ added in v1.3.1
func (*Client) ReadDHCPRelayPolicyProvider ¶ added in v1.3.1
func (client *Client) ReadDHCPRelayPolicyProvider(obj *models.DHCPRelayPolicyProvider) (*models.DHCPRelayPolicyProvider, error)
func (*Client) ReadInterSchemaSiteVrfRegionHubNetwork ¶ added in v1.3.1
func (client *Client) ReadInterSchemaSiteVrfRegionHubNetwork(obj *models.InterSchemaSiteVrfRegionHubNetork) (*models.InterSchemaSiteVrfRegionHubNetork, error)
func (*Client) ReadIntersiteL3outs ¶ added in v1.3.1
func (client *Client) ReadIntersiteL3outs(obj *models.IntersiteL3outs) (*models.IntersiteL3outs, error)
func (*Client) ReadSchemaValidate ¶ added in v1.3.1
func (client *Client) ReadSchemaValidate(obj *models.SchemValidate) (*models.SchemValidate, error)
func (*Client) ReadTemplateBDDHCPPolicy ¶ added in v1.3.1
func (*Client) UpdateAnpEpgUsegAttr ¶ added in v1.3.8
func (client *Client) UpdateAnpEpgUsegAttr(obj *models.SiteUsegAttr) error
func (*Client) UpdateDHCPOptionPolicy ¶ added in v1.3.1
func (*Client) UpdateDHCPOptionPolicyOption ¶ added in v1.3.1
func (client *Client) UpdateDHCPOptionPolicyOption(obj *models.DHCPOptionPolicyOption) error
func (*Client) UpdateDHCPRelayPolicy ¶ added in v1.3.1
func (*Client) UpdateDHCPRelayPolicyProvider ¶ added in v1.3.1
func (client *Client) UpdateDHCPRelayPolicyProvider(new *models.DHCPRelayPolicyProvider, old *models.DHCPRelayPolicyProvider) error
func (*Client) UpdateTemplateBDDHCPPolicy ¶ added in v1.3.1
Source Files ¶
- auth.go
- client.go
- client_service.go
- dhcp_option_policy_option_service.go
- dhcp_option_policy_service.go
- dhcp_relay_policy_provider_service.go
- dhcp_relay_policy_service.go
- schema_site_anp_epg_useg_attr_service.go
- schema_site_l3_out_service.go
- schema_site_vrf_region_hub_network_service.go
- schema_template_bd_dhcp_policy_service.go
- schema_validate_service.go
- template_service.go