Merge pull request #364 from adamreese/fix/dm-rename-client

ref(client): rename pkg/dm to pkg/client
pull/368/head
Adam Reese 9 years ago
commit fb08885110

@ -93,7 +93,7 @@ func doUpload(filename, cname string, cxt *cli.Context) (string, error) {
return "", nil
}
c := client(cxt)
c := NewClient(cxt)
return c.PostChart(filename, cname)
}

@ -42,7 +42,7 @@ func deleteDeployment(c *cli.Context) error {
return errors.New("First argument, deployment name, is required. Try 'helm get --help'")
}
name := args[0]
deployment, err := client(c).DeleteDeployment(name)
deployment, err := NewClient(c).DeleteDeployment(name)
if err != nil {
return err
}

@ -102,7 +102,7 @@ func deploy(c *cli.Context) error {
}
}
return client(c).PostDeployment(cfg)
return NewClient(c).PostDeployment(cfg)
}
// isLocalChart returns true if the given path can be statted.

@ -21,7 +21,7 @@ import (
"os"
"github.com/codegangsta/cli"
"github.com/kubernetes/deployment-manager/pkg/dm"
"github.com/kubernetes/deployment-manager/pkg/client"
"github.com/kubernetes/deployment-manager/pkg/format"
"github.com/kubernetes/deployment-manager/pkg/kubectl"
)
@ -133,7 +133,7 @@ func dmCmd() cli.Command {
func install(dryRun bool, ebImg, manImg, resImg string) error {
runner := getKubectlRunner(dryRun)
i := dm.NewInstaller()
i := client.NewInstaller()
i.Manager["Image"] = manImg
i.Resourcifier["Image"] = resImg
i.Expandybird["Image"] = ebImg
@ -149,7 +149,7 @@ func install(dryRun bool, ebImg, manImg, resImg string) error {
func uninstall(dryRun bool) error {
runner := getKubectlRunner(dryRun)
out, err := dm.Uninstall(runner)
out, err := client.Uninstall(runner)
if err != nil {
format.Err("Error uninstalling: %s %s", out, err)
}

@ -18,7 +18,7 @@ package main
import (
"github.com/codegangsta/cli"
"github.com/kubernetes/deployment-manager/pkg/dm"
"github.com/kubernetes/deployment-manager/pkg/client"
"github.com/kubernetes/deployment-manager/pkg/format"
"github.com/kubernetes/deployment-manager/pkg/kubectl"
)
@ -39,7 +39,7 @@ func doctorCmd() cli.Command {
func doctor(c *cli.Context) error {
var runner kubectl.Runner
runner = &kubectl.RealRunner{}
if dm.IsInstalled(runner) {
if client.IsInstalled(runner) {
format.Success("You have everything you need. Go forth my friend!")
} else {
format.Warning("Looks like you don't have DM installed.\nRun: `helm install`")

@ -42,7 +42,7 @@ func get(c *cli.Context) error {
return errors.New("First argument, deployment name, is required. Try 'helm get --help'")
}
name := args[0]
deployment, err := client(c).GetDeployment(name)
deployment, err := NewClient(c).GetDeployment(name)
if err != nil {
return err
}

@ -20,7 +20,7 @@ import (
"os"
"github.com/codegangsta/cli"
"github.com/kubernetes/deployment-manager/pkg/dm"
"github.com/kubernetes/deployment-manager/pkg/client"
)
var version = "0.0.1"
@ -78,9 +78,9 @@ func run(c *cli.Context, f func(c *cli.Context) error) {
}
}
func client(c *cli.Context) *dm.Client {
func NewClient(c *cli.Context) *client.Client {
host := c.GlobalString("host")
debug := c.GlobalBool("debug")
timeout := c.GlobalInt("timeout")
return dm.NewClient(host).SetDebug(debug).SetTimeout(timeout)
return client.NewClient(host).SetDebug(debug).SetTimeout(timeout)
}

@ -34,7 +34,7 @@ func listCmd() cli.Command {
}
func list(c *cli.Context) error {
list, err := client(c).ListDeployments()
list, err := NewClient(c).ListDeployments()
if err != nil {
return err
}

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package dm
package client
import (
"encoding/json"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package dm
package client
import (
"fmt"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package dm
package client
import (
"bytes"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package dm
package client
import (
"fmt"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package dm
package client
import (
"bytes"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package dm
package client
import (
"github.com/kubernetes/deployment-manager/pkg/kubectl"
Loading…
Cancel
Save