[ARVADOS] updated: 1.2.0-39-g54701e0e4
Git user
git at public.curoverse.com
Thu Aug 23 16:38:38 EDT 2018
Summary of changes:
lib/dispatchcloud/azure.go | 6 +++---
lib/dispatchcloud/provider.go | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
via 54701e0e492064eb05bf707d4c1886442cb066de (commit)
from 10c41c20f05537e5249983ddb5ebc8fd2441b1c3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 54701e0e492064eb05bf707d4c1886442cb066de
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Thu Aug 23 16:38:28 2018 -0400
13964: InstanceTags type
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/lib/dispatchcloud/azure.go b/lib/dispatchcloud/azure.go
index dcfcf0564..21e8d28d8 100644
--- a/lib/dispatchcloud/azure.go
+++ b/lib/dispatchcloud/azure.go
@@ -245,7 +245,7 @@ func (az *AzureProvider) setup(azcfg AzureProviderConfig, arvcfg arvados.Cluster
func (az *AzureProvider) Create(ctx context.Context,
instanceType arvados.InstanceType,
imageId ImageID,
- newTags map[string]string) (Instance, error) {
+ newTags InstanceTags) (Instance, error) {
name, err := randutil.String(15, "abcdefghijklmnopqrstuvwxyz0123456789")
if err != nil {
@@ -537,7 +537,7 @@ func (ai *AzureInstance) InstanceType() arvados.InstanceType {
return ai.instanceType
}
-func (ai *AzureInstance) SetTags(ctx context.Context, newTags map[string]string) error {
+func (ai *AzureInstance) SetTags(ctx context.Context, newTags InstanceTags) error {
tags := make(map[string]*string)
for k, v := range ai.vm.Tags {
@@ -562,7 +562,7 @@ func (ai *AzureInstance) SetTags(ctx context.Context, newTags map[string]string)
return nil
}
-func (ai *AzureInstance) GetTags(ctx context.Context) (map[string]string, error) {
+func (ai *AzureInstance) GetTags(ctx context.Context) (InstanceTags, error) {
tags := make(map[string]string)
for k, v := range ai.vm.Tags {
diff --git a/lib/dispatchcloud/provider.go b/lib/dispatchcloud/provider.go
index efaf2a6c3..3322575dc 100644
--- a/lib/dispatchcloud/provider.go
+++ b/lib/dispatchcloud/provider.go
@@ -32,7 +32,7 @@ type QuotaError interface {
error
}
-type InstanceTag string
+type InstanceTags map[string]string
type InstanceID string
type ImageID string
@@ -43,9 +43,9 @@ type Instance interface {
// Configured Arvados instance type
InstanceType() arvados.InstanceType
// Get tags
- GetTags(context.Context) (map[string]string, error)
+ GetTags(context.Context) (InstanceTags, error)
// Replace tags with the given tags
- SetTags(context.Context, map[string]string) error
+ SetTags(context.Context, InstanceTags) error
// Shut down the node
Destroy(context.Context) error
// SSH server hostname or IP address, or empty string if unknown pending creation.
@@ -53,6 +53,6 @@ type Instance interface {
}
type Provider interface {
- Create(context.Context, arvados.InstanceType, ImageID, map[string]string) (Instance, error)
+ Create(context.Context, arvados.InstanceType, ImageID, InstanceTags) (Instance, error)
Instances(context.Context) ([]Instance, error)
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list