github.com/cloud-green/juju@v0.0.0-20151002100041-a00291338d3d/cmd/juju/space/export_test.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package space 5 6 func NewCreateCommand(api SpaceAPI) *CreateCommand { 7 createCmd := &CreateCommand{} 8 createCmd.api = api 9 return createCmd 10 } 11 12 func NewRemoveCommand(api SpaceAPI) *RemoveCommand { 13 removeCmd := &RemoveCommand{} 14 removeCmd.api = api 15 return removeCmd 16 } 17 18 func NewUpdateCommand(api SpaceAPI) *UpdateCommand { 19 updateCmd := &UpdateCommand{} 20 updateCmd.api = api 21 return updateCmd 22 } 23 24 func NewRenameCommand(api SpaceAPI) *RenameCommand { 25 renameCmd := &RenameCommand{} 26 renameCmd.api = api 27 return renameCmd 28 } 29 30 func NewListCommand(api SpaceAPI) *ListCommand { 31 listCmd := &ListCommand{} 32 listCmd.api = api 33 return listCmd 34 } 35 36 func ListFormat(cmd *ListCommand) string { 37 return cmd.out.Name() 38 }