+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: Apache-2.0
+
package arvados
import (
ClusterID string `json:"-"`
ManagementToken string
SystemNodes map[string]SystemNode
+ InstanceTypes []InstanceType
+}
+
+type InstanceType struct {
+ Name string
+ ProviderType string
+ VCPUs int
+ RAM int64
+ Scratch int64
+ Price float64
}
-// GetThisSystemNodeConfig returns a SystemNode for the node we're
-// running on right now.
+// GetThisSystemNode returns a SystemNode for the node we're running
+// on right now.
func (cc *Cluster) GetThisSystemNode() (*SystemNode, error) {
hostname, err := os.Hostname()
if err != nil {
return cc.GetSystemNode(hostname)
}
-// GetSystemNodeConfig returns a NodeConfig for the given node. An
-// error is returned if the appropriate configuration can't be
-// determined (e.g., this does not appear to be a system node).
+// GetSystemNode returns a SystemNode for the given hostname. An error
+// is returned if the appropriate configuration can't be determined
+// (e.g., this does not appear to be a system node).
func (cc *Cluster) GetSystemNode(node string) (*SystemNode, error) {
if cfg, ok := cc.SystemNodes[node]; ok {
return &cfg, nil