Documentation ¶
Index ¶
- Constants
- func Bool(value bool) *bool
- func Int32(value int32) *int32
- func Int64(value int64) *int64
- func String(value string) *string
- type Auth
- type AuthResponse
- type Client
- type ErrorResponse
- type Option
- func Insecure(insecure bool) Option
- func LogLevel(level int) Option
- func RetryCount(retryCount int) Option
- func RetryMaxWaitTimeSeconds(retryMaxWaitTime int) Option
- func RetryWaitTimeInSeconds(retryWaitTime int) Option
- func SkipLoggingPayload(skipLoggingPayload bool) Option
- func TimeoutInSeconds(timeout int) Option
- type RequestOpts
- type ServiceManager
- func (sm *ServiceManager) CreateEndPort(id, name *string, endPortAttr *models.EndPortAttributes) error
- func (sm *ServiceManager) CreateLogicalNetwork(id, name *string, logicalNetworkAttr *models.LogicalNetworkAttributes) error
- func (sm *ServiceManager) CreateLogicalPort(id, name *string, logicalPortAttr *models.LogicalPortAttributes) error
- func (sm *ServiceManager) CreateLogicalRouter(id, name *string, logicalRouterAttr *models.LogicalRouterAttributes) error
- func (sm *ServiceManager) CreateLogicalSwitch(id, name *string, logicalSwitchAttr *models.LogicalSwitchAttributes) error
- func (sm *ServiceManager) CreateTenant(id, name *string, tenantAttr *models.TenantAttributes) error
- func (sm *ServiceManager) Del(modulename, url, id string, opts *RequestOpts) (*resty.Response, error)
- func (sm *ServiceManager) DeleteEndPort(id string) error
- func (sm *ServiceManager) DeleteLogicalNetwork(id string) error
- func (sm *ServiceManager) DeleteLogicalPort(id string) error
- func (sm *ServiceManager) DeleteLogicalRouter(id string) error
- func (sm *ServiceManager) DeleteLogicalSwitch(id string) error
- func (sm *ServiceManager) DeleteTenant(id string) error
- func (sm *ServiceManager) Get(modulename, url, id string, opts *RequestOpts) (*resty.Response, error)
- func (sm *ServiceManager) GetDHCPGroup(id string) (*models.DHCPGroup, error)
- func (sm *ServiceManager) GetEndPort(id string) (*models.EndPort, error)
- func (sm *ServiceManager) GetExternalGateway(id string) (*models.ExternalGateway, error)
- func (sm *ServiceManager) GetFabric(id string) (*models.Fabric, error)
- func (sm *ServiceManager) GetLogicalNetwork(id string) (*models.LogicalNetwork, error)
- func (sm *ServiceManager) GetLogicalPort(id string) (*models.LogicalPort, error)
- func (sm *ServiceManager) GetLogicalRouter(id string) (*models.LogicalRouter, error)
- func (sm *ServiceManager) GetLogicalSwitch(id string) (*models.LogicalSwitch, error)
- func (sm *ServiceManager) GetTenant(id string) (*models.Tenant, error)
- func (sm *ServiceManager) List(url string, opts *RequestOpts) (*resty.Response, error)
- func (sm *ServiceManager) ListDHCPGroups(queryParameters *models.DHCPGroupRequestOpts) ([]*models.DHCPGroup, error)
- func (sm *ServiceManager) ListEndPorts(queryParameters *models.EndPortRequestOpts) ([]*models.EndPort, error)
- func (sm *ServiceManager) ListExternalGateways(queryParameters *models.ExternalGatewayRequestOpts) ([]*models.ExternalGateway, error)
- func (sm *ServiceManager) ListFabrics(queryParameters *models.FabricRequestOpts) ([]*models.Fabric, error)
- func (sm *ServiceManager) ListLogicalNetworks(queryParameters *models.LogicalNetworkRequestOpts) ([]*models.LogicalNetwork, error)
- func (sm *ServiceManager) ListLogicalPorts(queryParameters *models.LogicalPortRequestOpts) ([]*models.LogicalPort, error)
- func (sm *ServiceManager) ListLogicalRouters(queryParameters *models.LogicalRouterRequestOpts) ([]*models.LogicalRouter, error)
- func (sm *ServiceManager) ListLogicalSwitches(queryParameters *models.LogicalSwitchRequestOpts) ([]*models.LogicalSwitch, error)
- func (sm *ServiceManager) ListTenants(queryParameters *models.TenantRequestOpts) ([]*models.Tenant, error)
- func (sm *ServiceManager) Post(url string, opts *RequestOpts) (*resty.Response, error)
- func (sm *ServiceManager) Put(modulename, url, id string, opts *RequestOpts) (*resty.Response, error)
- func (sm *ServiceManager) UpdateEndPort(id, name *string, endPortAttr *models.EndPortAttributes) (*models.EndPort, error)
- func (sm *ServiceManager) UpdateLogicalNetwork(id, name *string, logicalNetworkAttr *models.LogicalNetworkAttributes) (*models.LogicalNetwork, error)
- func (sm *ServiceManager) UpdateLogicalPort(id, name *string, logicalPortAttr *models.LogicalPortAttributes) (*models.LogicalPort, error)
- func (sm *ServiceManager) UpdateLogicalRouter(id, name *string, logicalRouterAttr *models.LogicalRouterAttributes) (*models.LogicalRouter, error)
- func (sm *ServiceManager) UpdateLogicalSwitch(id, name *string, logicalSwitchAttr *models.LogicalSwitchAttributes) (*models.LogicalSwitch, error)
- func (sm *ServiceManager) UpdateTenant(id, name *string, tenantAttr *models.TenantAttributes) (*models.Tenant, error)
Constants ¶
View Source
const DHCPGroupModuleURL = "/controller/dc/v3/publicservice/dhcpgroups"
View Source
const EndPortModuleURL = "/controller/dc/v3/logicnetwork/endports"
View Source
const ExternalGatewayModuleURL = "/controller/dc/v3/publicservice/external-gateways"
View Source
const FabricModuleURL = "/controller/dc/v3/physicalnetwork/fabricresource/fabrics"
View Source
const LogicalNetworkModuleURL = "/controller/dc/v3/logicnetwork/networks"
View Source
const LogicalPortModuleURL = "/controller/dc/v3/logicnetwork/ports"
View Source
const LogicalRouterModuleURL = "/controller/dc/v3/logicnetwork/routers"
View Source
const LogicalSwitchModuleURL = "/controller/dc/v3/logicnetwork/switchs"
View Source
const TenantModuleURL = "/controller/dc/v3/tenants"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
func (*Auth) CaclulateOffset ¶
func (t *Auth) CaclulateOffset()
type AuthResponse ¶
type Client ¶
type Client struct { BaseURL string AuthToken *Auth *ServiceManager // contains filtered or unexported fields }
Client is the main entry point
func GetClientTest ¶
func GetClientTest() *Client
func NewClient ¶
NewClient returns a new Instance of the client - allowing for simultaneous connections to the same APIC
func (*Client) Authenticate ¶
func (*Client) InjectAuthenticationHeader ¶
type ErrorResponse ¶
func CheckForErrors ¶
func CheckForErrors(response *resty.Response, method, url string) *ErrorResponse
func (*ErrorResponse) Error ¶
func (err *ErrorResponse) Error() string
type Option ¶
type Option func(*Client)
func RetryCount ¶
func RetryMaxWaitTimeSeconds ¶
func RetryWaitTimeInSeconds ¶
func SkipLoggingPayload ¶
func TimeoutInSeconds ¶
type RequestOpts ¶
type RequestOpts struct { QueryString interface{} // JSONBody, if provided, will be encoded as JSON and used as the body of the HTTP request. The // content type of the request will default to "application/json" unless overridden by MoreHeaders. // It's an error to specify both a JSONBody and a RawBody. Body interface{} // JSONResponse, if provided, will be populated with the contents of the response body parsed as // JSON. Response interface{} }
RequestOpts customizes the behavior of the provider.Request() method.
type ServiceManager ¶
type ServiceManager struct {
// contains filtered or unexported fields
}
func NewServiceManager ¶
func NewServiceManager(client *Client) *ServiceManager
func (*ServiceManager) CreateEndPort ¶
func (sm *ServiceManager) CreateEndPort(id, name *string, endPortAttr *models.EndPortAttributes) error
func (*ServiceManager) CreateLogicalNetwork ¶
func (sm *ServiceManager) CreateLogicalNetwork(id, name *string, logicalNetworkAttr *models.LogicalNetworkAttributes) error
func (*ServiceManager) CreateLogicalPort ¶
func (sm *ServiceManager) CreateLogicalPort(id, name *string, logicalPortAttr *models.LogicalPortAttributes) error
func (*ServiceManager) CreateLogicalRouter ¶
func (sm *ServiceManager) CreateLogicalRouter(id, name *string, logicalRouterAttr *models.LogicalRouterAttributes) error
func (*ServiceManager) CreateLogicalSwitch ¶
func (sm *ServiceManager) CreateLogicalSwitch(id, name *string, logicalSwitchAttr *models.LogicalSwitchAttributes) error
func (*ServiceManager) CreateTenant ¶
func (sm *ServiceManager) CreateTenant(id, name *string, tenantAttr *models.TenantAttributes) error
func (*ServiceManager) Del ¶
func (sm *ServiceManager) Del(modulename, url, id string, opts *RequestOpts) (*resty.Response, error)
func (*ServiceManager) DeleteEndPort ¶
func (sm *ServiceManager) DeleteEndPort(id string) error
func (*ServiceManager) DeleteLogicalNetwork ¶
func (sm *ServiceManager) DeleteLogicalNetwork(id string) error
func (*ServiceManager) DeleteLogicalPort ¶
func (sm *ServiceManager) DeleteLogicalPort(id string) error
func (*ServiceManager) DeleteLogicalRouter ¶
func (sm *ServiceManager) DeleteLogicalRouter(id string) error
func (*ServiceManager) DeleteLogicalSwitch ¶
func (sm *ServiceManager) DeleteLogicalSwitch(id string) error
func (*ServiceManager) DeleteTenant ¶
func (sm *ServiceManager) DeleteTenant(id string) error
func (*ServiceManager) Get ¶
func (sm *ServiceManager) Get(modulename, url, id string, opts *RequestOpts) (*resty.Response, error)
func (*ServiceManager) GetDHCPGroup ¶
func (sm *ServiceManager) GetDHCPGroup(id string) (*models.DHCPGroup, error)
func (*ServiceManager) GetEndPort ¶
func (sm *ServiceManager) GetEndPort(id string) (*models.EndPort, error)
func (*ServiceManager) GetExternalGateway ¶
func (sm *ServiceManager) GetExternalGateway(id string) (*models.ExternalGateway, error)
func (*ServiceManager) GetFabric ¶
func (sm *ServiceManager) GetFabric(id string) (*models.Fabric, error)
func (*ServiceManager) GetLogicalNetwork ¶
func (sm *ServiceManager) GetLogicalNetwork(id string) (*models.LogicalNetwork, error)
func (*ServiceManager) GetLogicalPort ¶
func (sm *ServiceManager) GetLogicalPort(id string) (*models.LogicalPort, error)
func (*ServiceManager) GetLogicalRouter ¶
func (sm *ServiceManager) GetLogicalRouter(id string) (*models.LogicalRouter, error)
func (*ServiceManager) GetLogicalSwitch ¶
func (sm *ServiceManager) GetLogicalSwitch(id string) (*models.LogicalSwitch, error)
func (*ServiceManager) GetTenant ¶
func (sm *ServiceManager) GetTenant(id string) (*models.Tenant, error)
func (*ServiceManager) List ¶
func (sm *ServiceManager) List(url string, opts *RequestOpts) (*resty.Response, error)
func (*ServiceManager) ListDHCPGroups ¶
func (sm *ServiceManager) ListDHCPGroups(queryParameters *models.DHCPGroupRequestOpts) ([]*models.DHCPGroup, error)
func (*ServiceManager) ListEndPorts ¶
func (sm *ServiceManager) ListEndPorts(queryParameters *models.EndPortRequestOpts) ([]*models.EndPort, error)
func (*ServiceManager) ListExternalGateways ¶
func (sm *ServiceManager) ListExternalGateways(queryParameters *models.ExternalGatewayRequestOpts) ([]*models.ExternalGateway, error)
func (*ServiceManager) ListFabrics ¶
func (sm *ServiceManager) ListFabrics(queryParameters *models.FabricRequestOpts) ([]*models.Fabric, error)
func (*ServiceManager) ListLogicalNetworks ¶
func (sm *ServiceManager) ListLogicalNetworks(queryParameters *models.LogicalNetworkRequestOpts) ([]*models.LogicalNetwork, error)
func (*ServiceManager) ListLogicalPorts ¶
func (sm *ServiceManager) ListLogicalPorts(queryParameters *models.LogicalPortRequestOpts) ([]*models.LogicalPort, error)
func (*ServiceManager) ListLogicalRouters ¶
func (sm *ServiceManager) ListLogicalRouters(queryParameters *models.LogicalRouterRequestOpts) ([]*models.LogicalRouter, error)
func (*ServiceManager) ListLogicalSwitches ¶
func (sm *ServiceManager) ListLogicalSwitches(queryParameters *models.LogicalSwitchRequestOpts) ([]*models.LogicalSwitch, error)
func (*ServiceManager) ListTenants ¶
func (sm *ServiceManager) ListTenants(queryParameters *models.TenantRequestOpts) ([]*models.Tenant, error)
func (*ServiceManager) Post ¶
func (sm *ServiceManager) Post(url string, opts *RequestOpts) (*resty.Response, error)
func (*ServiceManager) Put ¶
func (sm *ServiceManager) Put(modulename, url, id string, opts *RequestOpts) (*resty.Response, error)
func (*ServiceManager) UpdateEndPort ¶
func (sm *ServiceManager) UpdateEndPort(id, name *string, endPortAttr *models.EndPortAttributes) (*models.EndPort, error)
func (*ServiceManager) UpdateLogicalNetwork ¶
func (sm *ServiceManager) UpdateLogicalNetwork(id, name *string, logicalNetworkAttr *models.LogicalNetworkAttributes) (*models.LogicalNetwork, error)
func (*ServiceManager) UpdateLogicalPort ¶
func (sm *ServiceManager) UpdateLogicalPort(id, name *string, logicalPortAttr *models.LogicalPortAttributes) (*models.LogicalPort, error)
func (*ServiceManager) UpdateLogicalRouter ¶
func (sm *ServiceManager) UpdateLogicalRouter(id, name *string, logicalRouterAttr *models.LogicalRouterAttributes) (*models.LogicalRouter, error)
func (*ServiceManager) UpdateLogicalSwitch ¶
func (sm *ServiceManager) UpdateLogicalSwitch(id, name *string, logicalSwitchAttr *models.LogicalSwitchAttributes) (*models.LogicalSwitch, error)
func (*ServiceManager) UpdateTenant ¶
func (sm *ServiceManager) UpdateTenant(id, name *string, tenantAttr *models.TenantAttributes) (*models.Tenant, error)
Click to show internal directories.
Click to hide internal directories.