github.com/mhilton/juju-juju@v0.0.0-20150901100907-a94dd2c73455/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 ) 15 16 func (c *DefinedCommand) ServiceTag() names.ServiceTag { 17 return c.serviceTag 18 } 19 20 func (c *DefinedCommand) FullSchema() bool { 21 return c.fullSchema 22 } 23 24 func (c *DoCommand) UnitTag() names.UnitTag { 25 return c.unitTag 26 } 27 28 func (c *DoCommand) ActionName() string { 29 return c.actionName 30 } 31 32 func (c *DoCommand) ParamsYAMLPath() string { 33 return c.paramsYAML.Path 34 } 35 36 func (c *DoCommand) KeyValueDoArgs() [][]string { 37 return c.args 38 } 39 40 func (c *DoCommand) ParseStrings() bool { 41 return c.parseStrings 42 } 43 44 func ActionResultsToMap(results []params.ActionResult) map[string]interface{} { 45 return resultsToMap(results) 46 }