You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
gridscale-check/storages_list.go

38 lines
598 B

// Copyright 2018 Felix Kronlage <fkr@hazardous.org>
package main
import (
"context"
"fmt"
)
type StorageListCommand struct {
}
var storageListCommand StorageListCommand
func (x *StorageListCommand) Execute(args []string) error {
config(Checker.ConfigFile)
ctx := context.Background()
storages, error := Config.Client.GetStorageList(ctx)
if error != nil {
Unknown(fmt.Sprintf("Error while retrieving storages: %s", error))
}
for key, storage := range storages {
fmt.Printf("%d: %v\n\n", key, storage.Properties)
}
Ok((""))
// never reached
return nil
}
func init() {
}