github.com/cloud-green/juju@v0.0.0-20151002100041-a00291338d3d/cmd/juju/action/export_test.go (about) 1 // Copyright 2014-2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package action 5 6 import ( 7 "github.com/juju/names" 8 9 "github.com/juju/juju/apiserver/params" 10 ) 11 12 var ( 13 NewActionAPIClient = &newAPIClient 14 AddValueToMap = addValueToMap 15 ) 16 17 func (c *DefinedCommand) ServiceTag() names.ServiceTag { 18 return c.serviceTag 19 } 20 21 func (c *DefinedCommand) FullSchema() bool { 22 return c.fullSchema 23 } 24 25 func (c *DoCommand) UnitTag() names.UnitTag { 26 return c.unitTag 27 } 28 29 func (c *DoCommand) ActionName() string { 30 return c.actionName 31 } 32 33 func (c *DoCommand) ParamsYAMLPath() string { 34 return c.paramsYAML.Path 35 } 36 37 func (c *DoCommand) KeyValueDoArgs() [][]string { 38 return c.args 39 } 40 41 func (c *DoCommand) ParseStrings() bool { 42 return c.parseStrings 43 } 44 45 func ActionResultsToMap(results []params.ActionResult) map[string]interface{} { 46 return resultsToMap(results) 47 }