Documentation ¶
Overview ¶
Package quobyte represents a golang API for the Quobyte Storage System
Index ¶
- Constants
- Variables
- func IsValidUUID(uuid string) bool
- type Client
- type CreateVolumeRequest
- type GetClientListResponse
- type GetTenantResponse
- type QuobyteClient
- func (client QuobyteClient) CreateVolume(request *CreateVolumeRequest) (string, error)
- func (client *QuobyteClient) DeleteVolume(UUID string) error
- func (client *QuobyteClient) DeleteVolumeByName(volumeName, tenant string) error
- func (client *QuobyteClient) DeleteVolumeByResolvingNamesToUUID(volume, tenant string) error
- func (client *QuobyteClient) GetAPIRetryPolicy() string
- func (client *QuobyteClient) GetClientList(tenant string) (GetClientListResponse, error)
- func (client *QuobyteClient) GetTenant(tenantIDs []string) (GetTenantResponse, error)
- func (client *QuobyteClient) GetTenantMap() (map[string]string, error)
- func (client QuobyteClient) GetTenantUUID(tenant string) (string, error)
- func (client QuobyteClient) GetVolumeUUID(volume, tenant string) (string, error)
- func (client *QuobyteClient) ResolveTenantNameToUUID(name string) (string, error)
- func (client *QuobyteClient) ResolveVolumeNameToUUID(volumeName, tenant string) (string, error)
- func (client *QuobyteClient) SetAPIRetryPolicy(retry string)
- func (client *QuobyteClient) SetTenant(tenantName string) (string, error)
- func (client *QuobyteClient) SetVolumeQuota(volumeUUID string, quotaSize uint64) error
- type TenantDomainConfiguration
- type TenantDomainConfigurationVolumeAccess
Constants ¶
const ( RetryNever string = "NEVER" RetryInteractive string = "INTERACTIVE" RetryInfinitely string = "INFINITELY" RetryOncePerTarget string = "ONCE_PER_TARGET" )
retry policy codes
Variables ¶
var UUIDValidator = regexp.MustCompile("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[8|9|aA|bB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$")
Functions ¶
func IsValidUUID ¶ added in v0.1.2
IsValidUUID Validates the given uuid
Types ¶
type CreateVolumeRequest ¶
type CreateVolumeRequest struct { Name string `json:"name,omitempty"` RootUserID string `json:"root_user_id,omitempty"` RootGroupID string `json:"root_group_id,omitempty"` ReplicaDeviceIDS []uint64 `json:"replica_device_ids,string,omitempty"` ConfigurationName string `json:"configuration_name,omitempty"` AccessMode uint32 `json:"access_mode,string,omitempty"` TenantID string `json:"tenant_id,omitempty"` // contains filtered or unexported fields }
CreateVolumeRequest represents a CreateVolumeRequest
type GetClientListResponse ¶
type GetClientListResponse struct {
Clients []Client `json:"client,omitempty"`
}
type GetTenantResponse ¶
type GetTenantResponse struct {
Tenants []*TenantDomainConfiguration `json:"tenant,omitempty"`
}
type QuobyteClient ¶
type QuobyteClient struct {
// contains filtered or unexported fields
}
func NewQuobyteClient ¶
func NewQuobyteClient(url string, username string, password string) *QuobyteClient
NewQuobyteClient creates a new Quobyte API client
func (QuobyteClient) CreateVolume ¶
func (client QuobyteClient) CreateVolume(request *CreateVolumeRequest) (string, error)
CreateVolume creates a new Quobyte volume. Its root directory will be owned by given user and group
func (*QuobyteClient) DeleteVolume ¶
func (client *QuobyteClient) DeleteVolume(UUID string) error
DeleteVolume deletes a Quobyte volume
func (*QuobyteClient) DeleteVolumeByName ¶
func (client *QuobyteClient) DeleteVolumeByName(volumeName, tenant string) error
DeleteVolumeByName deletes a volume by a given name
func (*QuobyteClient) DeleteVolumeByResolvingNamesToUUID ¶ added in v0.1.2
func (client *QuobyteClient) DeleteVolumeByResolvingNamesToUUID(volume, tenant string) error
DeleteVolumeByResolvingNamesToUUID deletes the volume by resolving the volume name and tenant name to respective UUID if required. This method should be used if the given volume, tenant information is name or UUID.
func (*QuobyteClient) GetAPIRetryPolicy ¶
func (client *QuobyteClient) GetAPIRetryPolicy() string
func (*QuobyteClient) GetClientList ¶
func (client *QuobyteClient) GetClientList(tenant string) (GetClientListResponse, error)
GetClientList returns a list of all active clients
func (*QuobyteClient) GetTenant ¶
func (client *QuobyteClient) GetTenant(tenantIDs []string) (GetTenantResponse, error)
GetTenant returns the Tenant configuration for all specified tenants
func (*QuobyteClient) GetTenantMap ¶
func (client *QuobyteClient) GetTenantMap() (map[string]string, error)
GetTenantMap returns a map that contains all tenant names and there ID's
func (QuobyteClient) GetTenantUUID ¶ added in v0.1.2
func (client QuobyteClient) GetTenantUUID(tenant string) (string, error)
GetTenantUUID resolves the tenatnUUID for the given name This method should be used when it is not clear if the given string is Tenant UUID or Name.
func (QuobyteClient) GetVolumeUUID ¶ added in v0.1.2
func (client QuobyteClient) GetVolumeUUID(volume, tenant string) (string, error)
GetVolumeUUID resolves the volumeUUID for the given volume and tenant name. This method should be used when it is not clear if the given string is volume UUID or Name.
func (*QuobyteClient) ResolveTenantNameToUUID ¶ added in v0.1.2
func (client *QuobyteClient) ResolveTenantNameToUUID(name string) (string, error)
ResolveTenantNameToUUID Returns UUID for given name, error if not found.
func (*QuobyteClient) ResolveVolumeNameToUUID ¶
func (client *QuobyteClient) ResolveVolumeNameToUUID(volumeName, tenant string) (string, error)
ResolveVolumeNameToUUID resolves a volume name to a UUID
func (*QuobyteClient) SetAPIRetryPolicy ¶
func (client *QuobyteClient) SetAPIRetryPolicy(retry string)
func (*QuobyteClient) SetTenant ¶
func (client *QuobyteClient) SetTenant(tenantName string) (string, error)
SetTenant creates a Tenant with the specified name
func (*QuobyteClient) SetVolumeQuota ¶
func (client *QuobyteClient) SetVolumeQuota(volumeUUID string, quotaSize uint64) error
SetVolumeQuota sets a Quota to the specified Volume
type TenantDomainConfiguration ¶
type TenantDomainConfiguration struct { TenantID string `json:"tenant_id,omitempty"` Name string `json:"name,omitempty"` RestrictToNetwork []string `json:"restrict_to_network,omitempty"` VolumeAccess []*TenantDomainConfigurationVolumeAccess `json:"volume_access,omitempty"` }