v1

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Copyright (c) 2022 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2022 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2023 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2022 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2019 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2023 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2023 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2019 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2022 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIsiGroupMember added in v1.13.0

func AddIsiGroupMember(ctx context.Context, client api.Client, groupName *string, gid *int32, member IsiAuthMemberItem) error

AddIsiGroupMember adds a member to the group, member can be a user/group.

func AddIsiRoleMember added in v1.13.0

func AddIsiRoleMember(ctx context.Context, client api.Client, roleID string, member IsiAuthMemberItem) error

AddIsiRoleMember adds a member to the role, member can be user/group.

func CopyIsiVolume

func CopyIsiVolume(
	ctx context.Context,
	client api.Client,
	sourceName, destinationName string,
) (resp *getIsiVolumesResp, err error)

CopyIsiVolume creates a new volume on the cluster based on an existing volume

func CopyIsiVolumeWithIsiPath

func CopyIsiVolumeWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, sourceName, destinationName string,
) (resp *getIsiVolumesResp, err error)

CopyIsiVolumeWithIsiPath creates a new volume with isiPath on the cluster based on an existing volume

func CreateIsiGroup added in v1.13.0

func CreateIsiGroup(ctx context.Context, client api.Client,
	name string, gid *int32, members []IsiAuthMemberItem,
	queryForce *bool, queryZone, queryProvider *string,
) (string, error)

CreateIsiGroup creates a new group.

func CreateIsiQuota

func CreateIsiQuota(
	ctx context.Context,
	client api.Client,
	path string, container bool, size, softLimit, advisoryLimit, softGracePrd int64,
) (string, error)

CreateIsiQuota creates a hard directory quota on given path

func CreateIsiUser added in v1.13.0

func CreateIsiUser(ctx context.Context, client api.Client, name string,
	queryForce *bool, queryZone, queryProvider *string,
	email, homeDirectory, password, primaryGroupName, fullName, shell *string,
	uid, primaryGroupId, expiry *int32, enabled, passwordExpires, promptPasswordChange, unlock *bool,
) (string, error)

CreateIsiUser creates a new user.

func CreateIsiVolume

func CreateIsiVolume(
	ctx context.Context,
	client api.Client,
	name string,
) (resp *getIsiVolumesResp, err error)

CreateIsiVolume makes a new volume on the cluster

func CreateIsiVolumeWithACL

func CreateIsiVolumeWithACL(
	ctx context.Context,
	client api.Client,
	name, ACL string,
) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithACL makes a new volume on the cluster with the specified permissions

func CreateIsiVolumeWithACLAndIsiPath

func CreateIsiVolumeWithACLAndIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name, ACL string,
) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithACLAndIsiPath makes a new volume on the cluster with the specified permissions and isiPath

func CreateIsiVolumeWithACLAndIsiPathMetaData added in v1.4.0

func CreateIsiVolumeWithACLAndIsiPathMetaData(
	ctx context.Context,
	client api.Client,
	isiPath, name, ACL string, metadata map[string]string,
) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithACLAndIsiPathMetadata makes a new volume on the cluster with the specified permissions and isiPath

func CreateIsiVolumeWithIsiPath

func CreateIsiVolumeWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name, isiVolumePathPermissions string,
) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithIsiPath makes a new volume with isiPath on the cluster

func CreateIsiVolumeWithIsiPathMetaData added in v1.4.0

func CreateIsiVolumeWithIsiPathMetaData(
	ctx context.Context,
	client api.Client,
	isiPath, name, isiVolumePathPermissions string, metadata map[string]string,
) (resp *getIsiVolumesResp, err error)

CreateIsiVolumeWithIsiPathMetaData makes a new volume with isiPath on the cluster

func DeleteIsiGroup added in v1.13.0

func DeleteIsiGroup(ctx context.Context, client api.Client, groupName *string, gid *int32) (err error)

DeleteIsiGroup removes the group by group-id.

func DeleteIsiQuota

func DeleteIsiQuota(
	ctx context.Context,
	client api.Client,
	path string,
) (err error)

DeleteIsiQuota removes the quota for a directory

func DeleteIsiQuotaByID

func DeleteIsiQuotaByID(
	ctx context.Context,
	client api.Client,
	id string,
) (err error)

DeleteIsiQuotaByID removes the quota for a directory by quota id

func DeleteIsiQuotaByIDWithZone

func DeleteIsiQuotaByIDWithZone(
	ctx context.Context,
	client api.Client,
	id, zone string,
) (err error)

DeleteIsiQuotaByIDWithZone removes the quota for a directory by quota id with access zone

func DeleteIsiUser added in v1.13.0

func DeleteIsiUser(ctx context.Context, client api.Client, userName *string, uid *int32) (err error)

DeleteIsiUser removes the user by user-id.

func DeleteIsiVolume

func DeleteIsiVolume(
	ctx context.Context,
	client api.Client,
	name string,
) (resp *getIsiVolumesResp, err error)

DeleteIsiVolume removes a volume from the cluster

func DeleteIsiVolumeWithIsiPath

func DeleteIsiVolumeWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name string,
) (resp *getIsiVolumesResp, err error)

DeleteIsiVolumeWithIsiPath removes a volume from the cluster with isiPath

func Export

func Export(
	ctx context.Context,
	client api.Client,
	path string,
) (err error)

Export enables an NFS export on the cluster to access the volumes. Return the path to the export so other processes can mount the volume directory

func GetAbsoluteSnapshotPath

func GetAbsoluteSnapshotPath(c api.Client, snapshotName, volumeName, zonePath string) string

GetAbsoluteSnapshotPath get the absolute path of a snapshot

func GetIsiExports

func GetIsiExports(
	ctx context.Context,
	client api.Client,
) (resp *getIsiExportsResp, err error)

GetIsiExports queries a list of all exports on the cluster

func GetIsiSnapshotFolderWithSize

func GetIsiSnapshotFolderWithSize(
	ctx context.Context,
	client api.Client,
	isiPath, name, volume string, accessZone string,
) (resp *getIsiVolumeSizeResp, err error)

GetIsiSnapshotFolderWithSize lists size of all the children files and subfolders in a sanpshot directory

func GetIsiSnapshots

func GetIsiSnapshots(
	ctx context.Context,
	client api.Client,
) (resp *getIsiSnapshotsResp, err error)

GetIsiSnapshots queries a list of all snapshots on the cluster

func GetIsiVolume

func GetIsiVolume(
	ctx context.Context,
	client api.Client,
	name string,
) (resp *getIsiVolumeAttributesResp, err error)

GetIsiVolume queries the attributes of a volume on the cluster

func GetIsiVolumeWithIsiPath

func GetIsiVolumeWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name string,
) (resp *getIsiVolumeAttributesResp, err error)

GetIsiVolumeWithIsiPath queries the attributes of a volume with isiPath on the cluster

func GetIsiVolumeWithSize

func GetIsiVolumeWithSize(
	ctx context.Context,
	client api.Client,
	isiPath, name string,
) (resp *getIsiVolumeSizeResp, err error)

GetIsiVolumeWithSize lists size of all the children files and subfolders in a directory

func GetIsiVolumeWithoutMetadata

func GetIsiVolumeWithoutMetadata(
	ctx context.Context,
	client api.Client,
	name string,
) (err error)

GetIsiVolumeWithoutMetadata is used to check whether a volume exists thus the url does not append the metadata parameter.

func GetIsiVolumeWithoutMetadataWithIsiPath

func GetIsiVolumeWithoutMetadataWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, name string,
) (err error)

GetIsiVolumeWithoutMetadataWithIsiPath is used to check whether a volume exists with isiPath thus the url does not append the metadata parameter.

func GetIsiVolumes

func GetIsiVolumes(
	ctx context.Context,
	client api.Client,
) (resp *getIsiVolumesResp, err error)

GetIsiVolumes queries a list of all volumes on the cluster

func GetRealNamespacePathWithIsiPath

func GetRealNamespacePathWithIsiPath(isiPath string) string

GetRealNamespacePathWithIsiPath gets the real namespace path by the combination of namespace and isiPath

func GetRealVolumeSnapshotPathWithIsiPath

func GetRealVolumeSnapshotPathWithIsiPath(isiPath, zonePath, name, accessZone string) string

GetRealVolumeSnapshotPathWithIsiPath gets the real volume snapshot path by using the isiPath in the parameter rather than use the default one in the client object

func RemoveIsiGroupMember added in v1.13.0

func RemoveIsiGroupMember(ctx context.Context, client api.Client, groupName *string, gid *int32, member IsiAuthMemberItem) error

RemoveIsiGroupMember remove a member from the group, member can be user/group.

func RemoveIsiRoleMember added in v1.13.0

func RemoveIsiRoleMember(ctx context.Context, client api.Client, roleID string, member IsiAuthMemberItem) error

RemoveIsiRoleMember remove a member from the role, member can be user/group.

func RemoveIsiSnapshot

func RemoveIsiSnapshot(
	ctx context.Context,
	client api.Client,
	id int64,
) error

RemoveIsiSnapshot deletes a snapshot from the cluster

func SetExportClients

func SetExportClients(
	ctx context.Context,
	client api.Client,
	Id int, clients []string,
) (err error)

SetExportClients limits access to an NFS export on the cluster to a specific client address.

func SetIsiQuotaHardThreshold

func SetIsiQuotaHardThreshold(
	ctx context.Context,
	client api.Client,
	path string, size, softLimit, advisoryLimit, softGracePrd int64,
) (string, error)

SetIsiQuotaHardThreshold sets the hard threshold of a quota for a directory This is really just CreateIsiQuota() with container set to false

func Unexport

func Unexport(
	ctx context.Context,
	client api.Client,
	Id int,
) (err error)

Unexport disables the NFS export on the cluster that points to the volumes directory.

func UpdateIsiGroupGID added in v1.13.0

func UpdateIsiGroupGID(ctx context.Context, client api.Client, groupName *string, gid *int32, newGid int32,
	queryZone, queryProvider *string,
) (err error)

UpdateIsiGroupGID updates the group's gid.

func UpdateIsiQuotaHardThreshold

func UpdateIsiQuotaHardThreshold(
	ctx context.Context,
	client api.Client,
	path string, size, softLimit, advisoryLimit, softGracePrd int64,
) (err error)

UpdateIsiQuotaHardThreshold modifies the hard threshold of a quota for a directory

func UpdateIsiQuotaHardThresholdByID added in v1.2.0

func UpdateIsiQuotaHardThresholdByID(
	ctx context.Context,
	client api.Client,
	ID string, size, softLimit, advisoryLimit, softGracePrd int64,
) (err error)

UpdateIsiQuotaHardThresholdByID modifies the hard threshold of a quota for a directory

func UpdateIsiUser added in v1.13.0

func UpdateIsiUser(ctx context.Context, client api.Client, userName *string, uid *int32,
	queryForce *bool, queryZone, queryProvider *string,
	email, homeDirectory, password, primaryGroupName, fullName, shell *string,
	newUid, primaryGroupId, expiry *int32, enabled, passwordExpires, promptPasswordChange, unlock *bool,
) (err error)

UpdateIsiUser updates the user.

Types

type AclRequest

type AclRequest struct {
	Authoritative string     `json:"authoritative"`
	Action        string     `json:"action"`
	Owner         *Ownership `json:"owner"`
	Group         *Ownership `json:"group,omitempty"`
}

type ExportClientList

type ExportClientList struct {
	Clients []string `json:"clients"`
}

Isi PAPI export clients JSON struct

type ExportPathList

type ExportPathList struct {
	Paths  []string `json:"paths"`
	MapAll struct {
		User   string   `json:"user"`
		Groups []string `json:"groups,omitempty"`
	} `json:"map_all"`
}

Isi PAPI export path JSON struct

type IsiAccessItemFileGroup added in v1.13.0

type IsiAccessItemFileGroup struct {
	// Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'.
	Id string `json:"id,omitempty"`
	// Specifies the persona name, which must be combined with a type.
	Name string `json:"name,omitempty"`
	// Specifies the type of persona, which must be combined with a name. Values can be user, group or wellknown
	Type string `json:"type,omitempty"`
}

IsiAccessItemFileGroup Specifies the persona of the file group.

func GetIsiGroupMembers added in v1.13.0

func GetIsiGroupMembers(ctx context.Context, client api.Client, groupName *string, gid *int32) (members []*IsiAccessItemFileGroup, err error)

GetIsiGroupMembers retrieves the members of a group.

type IsiAuthMemberItem added in v1.13.0

type IsiAuthMemberItem struct {
	Id   *int32  `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type string  `json:"type"`
}

IsiAuthMemberItem Specifies the persona of the group member. Member can be user or group.

type IsiCopySnapshotResp added in v1.12.0

type IsiCopySnapshotResp struct {
	Errors []struct {
		ErrorErc string `json:"error_src"`
		Message  string `json:"message"`
		Source   string `json:"source"`
		Target   string `json:"target"`
	} `json:"copy_errors"`
	Success bool `json:"success"`
}

func CopyIsiSnapshotWithIsiPath

func CopyIsiSnapshotWithIsiPath(
	ctx context.Context,
	client api.Client,
	isiPath, snapshotSourceVolumeIsiPath, sourceSnapshotName, sourceVolume, destinationName string, accessZone string,
) (resp *IsiCopySnapshotResp, err error)

CopyIsiSnapshotWithIsiPath copies all files/directories in a snapshot in under the defined isiPath to a new directory

type IsiExport

type IsiExport struct {
	Id      int      `json:"id"`
	Paths   []string `json:"paths"`
	Clients []string `json:"clients"`
}

Isi PAPI export attributes JSON structs

type IsiGroup added in v1.13.0

type IsiGroup struct {
	// Specifies the distinguished name for the user.
	Dn string `json:"dn"`
	// Specifies the DNS domain.
	DnsDomain string `json:"dns_domain"`
	// Specifies the domain that the object is part of.
	Domain string `json:"domain"`
	// If true, the GID was generated.
	GeneratedGid bool                   `json:"generated_gid"`
	Gid          IsiAccessItemFileGroup `json:"gid"`
	// Specifies the user or group ID.
	Id string `json:"id"`
	// Specifies the groups that this user or group are members of.
	MemberOf []IsiAccessItemFileGroup `json:"member_of"`
	// Specifies a user or group name.
	Name string `json:"name"`
	// ObjectHistory []V1AuthGroupObjectHistoryItem `json:"object_history,omitempty"`
	// Specifies the authentication provider that the object belongs to.
	Provider string `json:"provider"`
	// Specifies a user or group name.
	SamAccountName string                 `json:"sam_account_name"`
	Sid            IsiAccessItemFileGroup `json:"sid"`
	// Specifies the object type.
	Type string `json:"type"`
}

IsiGroup Specifies configuration properties for a group.

func GetIsiGroup added in v1.13.0

func GetIsiGroup(ctx context.Context, client api.Client, groupName *string, gid *int32) (group *IsiGroup, err error)

GetIsiGroup queries the group by group-id.

func GetIsiGroupList added in v1.13.0

func GetIsiGroupList(ctx context.Context, client api.Client,
	queryNamePrefix, queryDomain, queryZone, queryProvider *string,
	queryCached, queryResolveNames, queryMemberOf *bool,
	queryLimit *int32,
) (groups []*IsiGroup, err error)

GetIsiGroupList queries all groups on the cluster with filter, filter by namePrefix, domain, zone, provider, cached, resolveNames, memberOf, zone and limit.

type IsiGroupListRespResume added in v1.13.0

type IsiGroupListRespResume struct {
	// Provide this token as the 'resume' query argument to continue listing results.
	Groups []*IsiGroup `json:"groups,omitempty"`
	// Provide this token as the 'resume' query argument to continue listing results.
	Resume string `json:"resume,omitempty"`
}

type IsiGroupMemberListRespResume added in v1.13.0

type IsiGroupMemberListRespResume struct {
	Members []*IsiAccessItemFileGroup `json:"members,omitempty"`
	Resume  string                    `json:"resume,omitempty"`
}

type IsiGroupReq added in v1.13.0

type IsiGroupReq struct {
	// Specifies the numeric group identifier.
	Gid *int32 `json:"gid,omitempty"`
	// Specifies the members of the group.
	Members []IsiAccessItemFileGroup `json:"members,omitempty"`
	// Specifies the group name.
	Name string `json:"name"`
}

IsiGroupReq Specifies the configuration properties for a group.

type IsiQuota

type IsiQuota struct {
	Container                 bool          `json:"container,omitempty"`
	Enforced                  bool          `json:"enforced,omitempty"`
	Id                        string        `json:"id"`
	IncludeSnapshots          bool          `json:"include_snapshots,omitempty"`
	Linked                    interface{}   `json:"linked,omitempty"`
	Notifications             string        `json:"notifications,omitempty"`
	Path                      string        `json:"path,omitempty"`
	Persona                   interface{}   `json:"persona,omitempty"`
	Ready                     bool          `json:"ready,omitempty"`
	Thresholds                isiThresholds `json:"thresholds,omitempty"`
	ThresholdsIncludeOverhead bool          `json:"thresholds_include_overhead,omitempty"`
	Type                      string        `json:"type,omitempty"`
	Usage                     struct {
		Inodes   int64 `json:"inodes"`
		Logical  int64 `json:"logical"`
		Physical int64 `json:"physical"`
	} `json:"usage"`
}

func GetAllIsiQuota added in v1.9.0

func GetAllIsiQuota(
	ctx context.Context,
	client api.Client,
) (quotas []*IsiQuota, err error)

GetAllIsiQuota queries all quotas on the cluster

func GetIsiQuota

func GetIsiQuota(
	ctx context.Context,
	client api.Client,
	path string,
) (quota *IsiQuota, err error)

GetIsiQuota queries the quota for a directory

func GetIsiQuotaByID added in v1.2.0

func GetIsiQuotaByID(
	ctx context.Context,
	client api.Client,
	ID string,
) (quota *IsiQuota, err error)

GetIsiQuotaByID get the Quota instance by ID

type IsiQuotaListRespResume added in v1.9.0

type IsiQuotaListRespResume struct {
	Quotas []*IsiQuota `json:"quotas,omitempty"`
	Resume string      `json:"resume,omitempty"`
}

func GetIsiQuotaWithResume added in v1.9.0

func GetIsiQuotaWithResume(
	ctx context.Context,
	client api.Client, resume string,
) (quotas *IsiQuotaListRespResume, err error)

GetIsiQuotaWithResume queries the next page quotas based on resume token

type IsiQuotaReq

type IsiQuotaReq struct {
	Enforced                  bool             `json:"enforced"`
	IncludeSnapshots          bool             `json:"include_snapshots"`
	Path                      string           `json:"path"`
	Thresholds                isiThresholdsReq `json:"thresholds"`
	ThresholdsIncludeOverhead bool             `json:"thresholds_include_overhead"`
	Type                      string           `json:"type"`
	Container                 bool             `json:"container"`
}

type IsiRole added in v1.13.0

type IsiRole struct {
	// Specifies the description of the role.
	Description string `json:"description"`
	// Specifies the users or groups that have this role.
	Members []IsiAccessItemFileGroup `json:"members"`
	// Specifies the name of the role.
	Name string `json:"name"`
	// Specifies the privileges granted by this role.
	Privileges []IsiRolePrivilegeItem `json:"privileges"`
	// Specifies the ID of the role.
	Id string `json:"id"`
}

func GetIsiRole added in v1.13.0

func GetIsiRole(ctx context.Context, client api.Client, roleId string) (role *IsiRole, err error)

GetIsiRole queries the role by role-id.

func GetIsiRoleList added in v1.13.0

func GetIsiRoleList(ctx context.Context, client api.Client, queryResolveNames *bool, queryLimit *int32) (roles []*IsiRole, err error)

GetIsiRoleList queries all roles on the cluster, filter by limit or resolveNames.

type IsiRoleListRespResume added in v1.13.0

type IsiRoleListRespResume struct {
	Resume string     `json:"resume,omitempty"`
	Roles  []*IsiRole `json:"roles,omitempty"`
	Total  *int32     `json:"total,omitempty"`
}

type IsiRolePrivilegeItem added in v1.13.0

type IsiRolePrivilegeItem struct {
	// Specifies the ID of the privilege.
	Id string `json:"id"`
	// Specifies the name of the privilege.
	Name *string `json:"name,omitempty"`
	// True, if the privilege is read-only.
	ReadOnly *bool `json:"read_only,omitempty"`
}

IsiRolePrivilegeItem Specifies the system-defined privilege that may be granted to users.

type IsiSnapshot

type IsiSnapshot struct {
	Created       int64   `json:"created"`
	Expires       int64   `json:"expires"`
	HasLocks      bool    `json:"has_locks"`
	Id            int64   `json:"id"`
	Name          string  `json:"name"`
	Path          string  `json:"path"`
	PctFilesystem float64 `json:"pct_filesystem"`
	PctReserve    float64 `json:"pct_reserve"`
	Schedule      string  `json:"schedule"`
	ShadowBytes   int64   `json:"shadow_bytes"`
	Size          int64   `json:"size"`
	State         string  `json:"state"`
	TargetId      int64   `json:"target_it"`
	TargetName    string  `json:"target_name"`
}

Isi PAPI snapshot JSON struct

func CreateIsiSnapshot

func CreateIsiSnapshot(
	ctx context.Context,
	client api.Client,
	path, name string,
) (resp *IsiSnapshot, err error)

CreateIsiSnapshot makes a new snapshot on the cluster

func GetIsiSnapshot

func GetIsiSnapshot(
	ctx context.Context,
	client api.Client,
	id int64,
) (*IsiSnapshot, error)

GetIsiSnapshot queries an individual snapshot on the cluster

func GetIsiSnapshotByIdentity

func GetIsiSnapshotByIdentity(
	ctx context.Context,
	client api.Client,
	identity string,
) (*IsiSnapshot, error)

GetIsiSnapshotByIdentity queries an individual snapshot on the cluster parm identity string: snapshot id or name

type IsiUpdateGroupReq added in v1.13.0

type IsiUpdateGroupReq struct {
	// Specifies the numeric group identifier.
	Gid int32 `json:"gid,omitempty"`
}

IsiUpdateGroupReq Specifies the configuration properties for a group.

type IsiUpdateQuotaReq

type IsiUpdateQuotaReq struct {
	Enforced                  bool             `json:"enforced"`
	Thresholds                isiThresholdsReq `json:"thresholds"`
	ThresholdsIncludeOverhead bool             `json:"thresholds_include_overhead"`
}

type IsiUpdateUserReq added in v1.13.0

type IsiUpdateUserReq struct {
	// Specifies an email address for the user.
	Email *string `json:"email,omitempty"`
	// If true, the authenticated user is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// Specifies the Unix Epoch time when the auth user will expire.
	Expiry *int32 `json:"expiry,omitempty"`
	// Specifies the GECOS value, which is usually the full name.
	Gecos *string `json:"gecos,omitempty"`
	// Specifies a home directory for the user.
	HomeDirectory *string `json:"home_directory,omitempty"`
	// Changes the password for the user.
	Password *string `json:"password,omitempty"`
	// If true, the password should expire.
	PasswordExpires *bool                   `json:"password_expires,omitempty"`
	PrimaryGroup    *IsiAccessItemFileGroup `json:"primary_group,omitempty"`
	// If true, prompts the user to change their password at the next login.
	PromptPasswordChange *bool `json:"prompt_password_change,omitempty"`
	// Specifies the shell for the user.
	Shell *string `json:"shell,omitempty"`
	// Specifies a numeric user identifier.
	Uid *int32 `json:"uid,omitempty"`
	// If true, the user account should be unlocked.
	Unlock *bool `json:"unlock,omitempty"`
}

type IsiUser added in v1.13.0

type IsiUser struct {
	// Specifies the distinguished name for the user.
	Dn string `json:"dn"`
	// Specifies the DNS domain.
	DnsDomain string `json:"dns_domain"`
	// Specifies the domain that the object is part of.
	Domain string `json:"domain"`
	// Specifies an email address.
	Email string `json:"email"`
	// True, if the authenticated user is enabled.
	Enabled bool `json:"enabled"`
	// True, if the authenticated user has expired.
	Expired bool `json:"expired"`
	// Specifies the Unix Epoch time at which the authenticated user will expire.
	Expiry int32 `json:"expiry"`
	// Specifies the GECOS value, which is usually the full name.
	Gecos string `json:"gecos"`
	// True, if the GID was generated.
	GeneratedGid bool `json:"generated_gid"`
	// True, if the UID was generated.
	GeneratedUid bool `json:"generated_uid"`
	// True, if the UPN was generated.
	GeneratedUpn bool                   `json:"generated_upn"`
	Gid          IsiAccessItemFileGroup `json:"gid"`
	// Specifies a home directory for the user.
	HomeDirectory string `json:"home_directory"`
	// Specifies the user or group ID.
	Id string `json:"id"`
	// If true, indicates that the account is locked.
	Locked bool `json:"locked"`
	// Specifies the maximum time in seconds allowed before the password expires.
	MaxPasswordAge int32 `json:"max_password_age"`
	// Specifies the groups that this user or group are members of.
	MemberOf            []IsiAccessItemFileGroup `json:"member_of"`
	Name                string                   `json:"name"`
	OnDiskGroupIdentity IsiAccessItemFileGroup   `json:"on_disk_group_identity"`
	OnDiskUserIdentity  IsiAccessItemFileGroup   `json:"on_disk_user_identity"`
	// If true, the password has expired.
	PasswordExpired bool `json:"password_expired"`
	// If true, the password is allowed to expire.
	PasswordExpires bool `json:"password_expires"`
	// Specifies the time in Unix Epoch seconds that the password will expire.
	PasswordExpiry int32 `json:"password_expiry"`
	// Specifies the last time the password was set.
	PasswordLastSet int32                  `json:"password_last_set"`
	PrimaryGroupSid IsiAccessItemFileGroup `json:"primary_group_sid"`
	// Prompts the user to change their password at the next login.
	PromptPasswordChange bool `json:"prompt_password_change"`
	// Specifies the authentication provider that the object belongs to.
	Provider string `json:"provider"`
	// Specifies a user or group name.
	SamAccountName string `json:"sam_account_name"`
	// Specifies a path to the shell for the user.
	Shell string                 `json:"shell"`
	Sid   IsiAccessItemFileGroup `json:"sid"`
	// Specifies the object type.
	Type string                 `json:"type"`
	Uid  IsiAccessItemFileGroup `json:"uid"`
	// Specifies a principal name for the user.
	Upn string `json:"upn"`
	// Specifies whether the password for the user can be changed.
	UserCanChangePassword bool `json:"user_can_change_password"`
}

func GetIsiUser added in v1.13.0

func GetIsiUser(ctx context.Context, client api.Client, userName *string, uid *int32) (user *IsiUser, err error)

GetIsiUser queries the user by user user-id.

func GetIsiUserList added in v1.13.0

func GetIsiUserList(ctx context.Context, client api.Client,
	queryNamePrefix, queryDomain, queryZone, queryProvider *string,
	queryCached, queryResolveNames, queryMemberOf *bool,
	queryLimit *int32,
) (users []*IsiUser, err error)

GetIsiUserList queries all users on the cluster, filter by namePrefix, domain, zone, provider, cached, resolveNames, memberOf, zone and limit.

type IsiUserListRespResume added in v1.13.0

type IsiUserListRespResume struct {
	Resume string     `json:"resume,omitempty"`
	Users  []*IsiUser `json:"users,omitempty"`
}

type IsiUserReq added in v1.13.0

type IsiUserReq struct {
	// Specifies an email address for the user.
	Email *string `json:"email,omitempty"`
	// If true, the authenticated user is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// Specifies the Unix Epoch time when the auth user will expire.
	Expiry *int32 `json:"expiry,omitempty"`
	// Specifies the GECOS value, which is usually the full name.
	Gecos *string `json:"gecos,omitempty"`
	// Specifies a home directory for the user.
	HomeDirectory *string `json:"home_directory,omitempty"`
	// Specifies a user name.
	Name string `json:"name"`
	// Changes the password for the user.
	Password *string `json:"password,omitempty"`
	// If true, the password should expire.
	PasswordExpires *bool                   `json:"password_expires,omitempty"`
	PrimaryGroup    *IsiAccessItemFileGroup `json:"primary_group,omitempty"`
	// If true, prompts the user to change their password at the next login.
	PromptPasswordChange *bool `json:"prompt_password_change,omitempty"`
	// Specifies the shell for the user.
	Shell *string `json:"shell,omitempty"`
	// Specifies a numeric user identifier.
	Uid *int32 `json:"uid,omitempty"`
	// If true, the user account should be unlocked.
	Unlock *bool `json:"unlock,omitempty"`
}

type IsiVolume

type IsiVolume struct {
	Name         string `json:"name"`
	AttributeMap []struct {
		Name  string      `json:"name"`
		Value interface{} `json:"value"`
	} `json:"attrs"`
}

func CopyIsiSnapshot

func CopyIsiSnapshot(
	ctx context.Context,
	client api.Client,
	sourceSnapshotName, sourceVolume, destinationName string, zonePath, accessZone string,
) (resp *IsiVolume, err error)

CopyIsiSnapshot copies all files/directories in a snapshot to a new directory

type IsiZone

type IsiZone struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Path string `json:"path"`
}

IsiZone contains information of an access zone

func GetZoneByName

func GetZoneByName(ctx context.Context,
	client api.Client,
	name string,
) (*IsiZone, error)

GetZoneByName returns a specific access zone which matches the name parsed in

type Ownership

type Ownership struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

Isi PAPI Volume ACL JSON structs

type SnapshotPath

type SnapshotPath struct {
	Path string `json:"path"`
	Name string `json:"name,omitempty"`
}

Isi PAPI snapshot path JSON struct

type VolumeName

type VolumeName struct {
	Name string `json:"name"`
}

Isi PAPI volume JSON structs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL