cf-targets-plugin

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

README

CF Targets Plugin

Build Status

This plugin facilitates the use of multiple api targets with the Cloud Foundry CLI.

It originated from the need for a Go play project, and the realization that I was frequently switching back and forth between development and various test environments, using tricks like

CF_HOME=~/cf-development cf push my-app
CF_HOME=~/cf-production cf push my-app

This plugin makes switching a lot less painful by allowing you to save your currently configured target using a name, then switching back to it by name at any point.

##Usage

Configure and save any number of named targets

$ cf api <development-target-url>
$ cf login
...
$ cf save-target development

Followed by

$ cf api <production-target-url>
$ cf login
...
$ cf save-target production

After saving targets, easily switch back and forth between them using:

$ cf set-target development
$ cf target
API Endpoint:   <development-target-url>
...
$ cf set-target production
$ cf target
API Endpoint:   <production-target-url>
...

View saved targets using

$ cf targets
development
production (current)

##Installation #####Install from CLI

$ cf add-plugin-repo CF-Community http://plugins.cloudfoundry.org/
$ cf install-plugin targets -r CF-Community

#####Install from Source (need to have Go installed)

$ go get github.com/cloudfoundry/cli
$ go get github.com/guidowb/cf-targets-plugin
$ cd $GOPATH/src/github.com/guidowb/cf-targets-plugin
$ go build
$ cf install-plugin cf-targets-plugin

##Full Command List

command usage description
targets cf targets list all saved targets
save-target cf save-target [-f] [<name>] save the current target for later use
set-target cf set-target [-f] <name> restore a previously saved target
delete-target cf delete-target <name> delete a previously saved target

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go.crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
_workspace/src/code.google.com/p/go.net/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/cf/actors/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/cf/api/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/cf/api/quotas/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/cf/api/stacks/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/cf/app_files/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/cf/command/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/cf/manifest/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/cf/net/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/cf/terminal/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/plugin/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/plugin/rpc/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/testhelpers/commands
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/utils/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/words/generator/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/loggregator_consumer
Package loggregator_consumer provides a simple, channel-based API for clients to communicate with loggregator servers.
Package loggregator_consumer provides a simple, channel-based API for clients to communicate with loggregator servers.
_workspace/src/github.com/cloudfoundry/sonde-go/events
Package events is a generated protocol buffer package.
Package events is a generated protocol buffer package.
_workspace/src/github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.
_workspace/src/github.com/gogo/protobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
_workspace/src/github.com/gogo/protobuf/proto/proto3_proto
Package proto3_proto is a generated protocol buffer package.
Package proto3_proto is a generated protocol buffer package.
_workspace/src/github.com/gorilla/websocket
Package websocket implements the WebSocket protocol defined in RFC 6455.
Package websocket implements the WebSocket protocol defined in RFC 6455.
_workspace/src/github.com/gorilla/websocket/examples/autobahn
Command server is a test server for the Autobahn WebSockets Test Suite.
Command server is a test server for the Autobahn WebSockets Test Suite.
_workspace/src/github.com/nicksnyder/go-i18n/i18n
Package i18n supports string translations with variable substitution and CLDR pluralization.
Package i18n supports string translations with variable substitution and CLDR pluralization.
_workspace/src/github.com/nicksnyder/go-i18n/i18n/bundle
Package bundle manages translations for multiple languages.
Package bundle manages translations for multiple languages.
_workspace/src/github.com/nicksnyder/go-i18n/i18n/language
Package language defines languages that implement CLDR pluralization.
Package language defines languages that implement CLDR pluralization.
_workspace/src/github.com/nicksnyder/go-i18n/i18n/translation
Package translation defines the interface for a translation.
Package translation defines the interface for a translation.
_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang
Ginkgo is a BDD-style testing framework for Golang
_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
Ginkgo accepts a number of configuration options.
The Ginkgo CLI
_workspace/src/github.com/onsi/ginkgo/internal/remote
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Ginkgo's Default Reporter
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
Gomega's format package pretty-prints objects.
_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
Package gbytes provides a buffer that supports incrementally detecting input.
_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
Package gexec provides support for testing external processes.
_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Gomega matchers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL