cacctmgr

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FlagAccount protos.AccountInfo
	FlagUser    protos.UserInfo
	FlagQos     protos.QosInfo

	// FlagPartition and FlagSetPartition are different.
	// FlagPartition limits the operation to a specific partition,
	// while the other is the partition to be added or deleted.
	FlagPartition    string
	FlagSetPartition string

	// FlagSetLevel and FlagLevel are different as
	// they have different default values.
	FlagLevel    string
	FlagSetLevel string

	// UserInfo does not have these fields (while AccountInfo does),
	// so we use separate flags for them.
	FlagUserCoordinator bool
	FlagUserDefaultQos  string
	FlagUserPartitions  []string
	FlagUserQosList     []string

	FlagForce          bool
	FlagFull           bool
	FlagJson           bool
	FlagConfigFilePath string

	// These flags are implemented,
	// but not added to any cmd!
	FlagNoHeader bool
	FlagFormat   string

	RootCmd = &cobra.Command{
		Use:     "cacctmgr",
		Short:   "Manage account, user and QoS tables",
		Long:    "",
		Version: util.Version(),
		PersistentPreRun: func(cmd *cobra.Command, args []string) {

			util.DetectNetworkProxy()
			config := util.ParseConfig(FlagConfigFilePath)
			stub = util.GetStubToCtldByConfig(config)
			userUid = uint32(os.Getuid())
		},
	}
)

Functions

func AddAccount

func AddAccount(account *protos.AccountInfo) util.CraneCmdError

func AddQos

func AddQos(qos *protos.QosInfo) util.CraneCmdError

func AddUser

func AddUser(user *protos.UserInfo, partition []string, level string, coordinator bool) util.CraneCmdError

func BlockAccountOrUser

func BlockAccountOrUser(name string, entityType protos.EntityType, account string) util.CraneCmdError

func DeleteAccount

func DeleteAccount(name string) util.CraneCmdError

func DeleteQos

func DeleteQos(name string) util.CraneCmdError

func DeleteUser

func DeleteUser(name string, account string) util.CraneCmdError

func FindAccount

func FindAccount(name string) util.CraneCmdError

func ModifyAccount

func ModifyAccount(modify_field protos.ModifyField, new_value string, name string, requestType protos.OperationType) util.CraneCmdError

func ModifyQos

func ModifyQos(modify_field protos.ModifyField, new_value string, name string) util.CraneCmdError

func ModifyUser

func ModifyUser(modify_field protos.ModifyField, new_value string, name string, account string, partition string, requestType protos.OperationType) util.CraneCmdError

func ParseCmdArgs

func ParseCmdArgs()

func PrintAccountTable

func PrintAccountTable(accountList []*protos.AccountInfo)

func PrintAccountTree

func PrintAccountTree(parentTreeRoot treeprint.Tree, account string, accountMap map[string]*protos.AccountInfo)

func PrintAllAccount

func PrintAllAccount(accountList []*protos.AccountInfo)

func PrintAllQos

func PrintAllQos(qosList []*protos.QosInfo)

func PrintAllUsers

func PrintAllUsers(userList []*protos.UserInfo)

func ShowAccounts

func ShowAccounts() util.CraneCmdError

func ShowQos

func ShowQos(name string) util.CraneCmdError

func ShowUser

func ShowUser(name string, account string) util.CraneCmdError

func UnblockAccountOrUser

func UnblockAccountOrUser(name string, entityType protos.EntityType, account string) util.CraneCmdError

Types

type ServerAddr

type ServerAddr struct {
	ControlMachine      string `yaml:"ControlMachine"`
	CraneCtldListenPort string `yaml:"CraneCtldListenPort"`
}

Jump to

Keyboard shortcuts

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