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