Documentation ¶
Index ¶
- func CheckVSphereConfig(ctx context.Context, o *ClientOption) error
- func CreateRole(ctx context.Context, o *ClientOption, role *Role) error
- func CreateSolutionUser(ctx context.Context, o *ClientOption) error
- func IsClusterNode(name string) bool
- func ParseConfig(configFile string) (config.Config, error)
- func ReadContent(path string) (string, error)
- type ClientOption
- type CreateUserFunc
- type Credential
- type Role
- type RolePermission
- type User
- type VCCMSecret
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckVSphereConfig ¶
func CheckVSphereConfig(ctx context.Context, o *ClientOption) error
CheckVSphereConfig performs vSphere health check on VMs TODO (fanz) : support checking network
func CreateRole ¶
func CreateRole(ctx context.Context, o *ClientOption, role *Role) error
CreateRole creates vSphere role
func CreateSolutionUser ¶
func CreateSolutionUser(ctx context.Context, o *ClientOption) error
CreateSolutionUser creates a default solution user (k8s-vcp) for CCM with Administrator role and WSTrust permissions
func IsClusterNode ¶
TODO (fanz): IsK8sNode validate if the given name refers to a node in kubernetes cluster
func ReadContent ¶
Types ¶
type ClientOption ¶
type ClientOption struct { Client *govmomi.Client // config Config Config config.Config // contains filtered or unexported fields }
func (*ClientOption) LoadCredential ¶
func (o *ClientOption) LoadCredential(username, password, cert, role string, insecure bool)
func (*ClientOption) Userinfo ¶
func (o *ClientOption) Userinfo() *url.Userinfo
type CreateUserFunc ¶
CreateUserFunc is function to create person user or solution user
type Credential ¶
type Credential struct { Secret VCCMSecret // contains filtered or unexported fields }
type RolePermission ¶
type RolePermission struct { Roles object.AuthorizationRoleList `json:",omitempty"` Permissions []vimType.Permission `json:",omitempty"` // contains filtered or unexported fields }
func GetRolePermission ¶
func GetRolePermission(ctx context.Context, c *ClientOption) (*RolePermission, error)
GetRolePermission returns RolePermission by User
type User ¶
type User struct { types.AdminPersonDetails // contains filtered or unexported fields }
func (*User) Run ¶
func (u *User) Run(ctx context.Context, c *ClientOption, fn CreateUserFunc) error
type VCCMSecret ¶
Click to show internal directories.
Click to hide internal directories.