pivnet-cli

command module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

Pivnet CLI

Interact with Pivotal Network from the command-line.

Installing

Binaries for various operating systems are provided with each release on the releases page.

Install for OSX via homebrew as follows:

brew install pivotal/tap/pivnet-cli

To install on linux: download the latest binary (see latest release) and ensure the file is executable and on the path.

Usage

Using the Pivnet CLI requires a valid Pivotal Network API token or UAA Refresh Token.

Refer to the official docs for more details on obtaining a Pivotal Network API token.

Example usage:

$ pivnet login --api-token='my-api-token'
$ pivnet products

+-----+------------------------------------------------------+--------------------------------+
| ID  |                         SLUG                         |              NAME              |
+-----+------------------------------------------------------+--------------------------------+
|  60 | elastic-runtime                                      | Pivotal Cloud Foundry Elastic  |
|     |                                                      | Runtime                        |
+-----+------------------------------------------------------+--------------------------------+

$ pivnet r -p elastic-runtime -r 2.3.1 --format json \
  | jq '{"id": .id, "release_date": .release_date, "release_type": .release_type}'

{
  "id": 196729,
  "release_date": "2018-10-05",
  "release_type": "Security Release"
}

Developing

Prerequisites

A valid install of golang >= 1.6 is required.

Dependencies

Dependencies are vendored in the vendor directory, according to the golang 1.5 vendor experiment.

No action is required to fetch the vendored dependencies.

Running the tests

Install the ginkgo executable with:

go get -u github.com/onsi/ginkgo/ginkgo

The tests require a valid Pivotal Network API token and host.

Refer to the official docs for more details on obtaining a Pivotal Network API token.

It is advised to run the acceptance tests against the Pivotal Network integration environment endpoint i.e. HOST='https://pivnet-integration.cfapps.io'.

Run the tests with the following command:

API_TOKEN=my-token \
HOST='https://pivnet-integration.cfapps.io' \
./bin/test
Contributing

Please make all pull requests to the master branch, and ensure the tests pass locally.

Project management

The CI for this project can be found here and the scripts can be found in the pivnet-resource-ci repo.

The roadmap is captured in Pivotal Tracker.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
authfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
commandsfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
curl/curlfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
dependencyspecifier/dependencyspecifierfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
eula/eulafakes
Code generated by counterfeiter.
Code generated by counterfeiter.
filegroup/filegroupfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
imagereference/imagereferencefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
login/loginfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
logout/logoutfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
pivnetversions/pivnetversionsfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
product/productfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
productfile/productfilefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
release/releasefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
releasedependency/releasedependencyfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
releasetype/releasetypefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
releaseupgradepath/releaseupgradepathfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
subscriptiongroup/subscriptiongroupfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
usergroup/usergroupfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
errorhandlerfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
gp
gpfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
printerfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
rc
rcfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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