Documentation ¶
Index ¶
- Constants
- func NewHTTPClient(insecureSkipVerify bool) *http.Client
- type Config
- type HTTPClient
- type ServiceProfile
- type UCSClient
- func (c *UCSClient) ConfigResolveDN(dn string) (*ServiceProfile, error)
- func (c *UCSClient) CreateServiceProfile(sp *ServiceProfile) (bool, error)
- func (c *UCSClient) Destroy(name, targetOrg string, hierarchical bool) error
- func (c *UCSClient) IsLoggedIn() bool
- func (c *UCSClient) Login() error
- func (c *UCSClient) Logout()
- func (c *UCSClient) Post(payload []byte) ([]byte, error)
- type VNIC
Constants ¶
View Source
const BODY_TYPE_XML = "text/xml"
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
Types ¶
type Config ¶
type HTTPClient ¶
type ServiceProfile ¶
type ServiceProfile struct { Name string Template string TargetOrg string Hierarchical bool VNICs []VNIC }
func (*ServiceProfile) DN ¶
func (sp *ServiceProfile) DN() string
func (*ServiceProfile) Marshal ¶
func (sp *ServiceProfile) Marshal(cookie string) ([]byte, error)
The XML request sent to the UCS server to create a Service Profile *must* include a cookie which does not belong to the ServiceProfile model per se, hence the `cookie` argument required.
func (*ServiceProfile) ToJSON ¶
func (sp *ServiceProfile) ToJSON() (string, error)
type UCSClient ¶
type UCSClient struct { Logger *utils.Logger // contains filtered or unexported fields }
func NewUCSClient ¶
func (*UCSClient) ConfigResolveDN ¶
func (c *UCSClient) ConfigResolveDN(dn string) (*ServiceProfile, error)
func (*UCSClient) CreateServiceProfile ¶
func (c *UCSClient) CreateServiceProfile(sp *ServiceProfile) (bool, error)
Performs a POST request to the UCS server to create a service profile. Returns bool to indicate wether or not the resource could be created, along with an error if anything went wrong.
func (*UCSClient) IsLoggedIn ¶
Determines if the UCSClient is logged into the server by checking the presence of cookie.
Click to show internal directories.
Click to hide internal directories.