Rename s/CommandRun/QueryCommandRun/

Because I need to use similar code in another test and:

- the names can't clash
- I can't figure out how to share this as a helper
Add vcloud-login utility for session tokens

As described by the --help argument:

    Usage: ./bin/vcloud-login [options]

    Utility for obtaining a Fog vCloud Director session token. It will output a
    shell `export` command that can be consumed with:

        eval $(FOG_CREDENTIAL=example ./bin/vcloud-login)

    It requires a Fog credentials file (e.g. `~/.fog`) with the host and user
    set, but the password set to an empty string. The password will be prompted
    for interactively.

This should serve to consolidate the various scripts other teams have needed to
create in order to follow the advice about not storing plaintext passwords in
the fogrc file.
Update README to reference new vcloud-login

Simplify the instructions for fetching a session token by using the new
vcloud-login utility. This will also need to be applied, or better
referenced, by the other projects once merged.
Move Vcloud::Core::Login to Vcloud::Fog::Login

Because this class is strictly concerned about interacting with Fog -
setting/checking credentials and logging in. This follows the pattern of
putting all of our direct-Fog interactions into a single namespace, so that
we can refactor them if required at a later date.
Don't use Fog.credentials to set password

Modifying the global credential hash feels quite magic, when we could just
pass the necessary argument into the VcloudDirector class, which will
override the credentials.

By accessing Fog directly, rather than through
Vcloud::Fog::ServiceInterface, we can also modify our abstractions to Fog in
order to make them always require a token and raise an exception if they
find a plaintext password. This will come at a later date.
Allow vcloud-login password to be piped in

The highline gem pretty much does this for us. All we need to do is change
the prompt to make it clear that it's reading data, and not output the
masked password. This will make it easier for us to use this login method in
CI where Jenkins has the password as an environment variable.
Move password reading Fog::Login->Core::LoginCli

As a user-facing interaction this belongs in the LoginCli class. This
simplifies Fog::Login by never prompting for a password and makes it easier
to use as a library.

I have however needed to extend the LoginCli spec tests to send STDIN data.
Suppress noisy fog "missing credentials" error

This occurs if we call ::Fog.credentials and it has been unable to load any
credentials from a FOG_RC file. If this happens then we can assume that
there isn't a plaintext password set, so continue. A more succinct error
will be produced when we instantiate Fog::Compute::VcloudDirector in
get_token().

This is an integration test rather than a unit test because we're testing
the behaviour of Fog (with some small instrumentation).
Add CHANGELOG entry for vcloud-login.
Make Vcloud::Fog::Login methods really private

The check_plaintext_pass and get_token methods weren't actually private
before because the `private` method has no effect on module methods.

I'm using `subject.token` as the public entry point instead of
`subject.send(:check_plaintext_pass, ...)` because it matches the normal
usage and also asserts that we don't attempt to get the token if we find a
plaintext password.

Thanks @timmow for the advice!
Replace token length regex with string#size

We don't need to use a fancy regex to check the length of a string. This is
much easier to read. I've broken the first token test out to a separate var
so that we're not doing too much with `expect()`.

NB: String length is our best indicator of a valid token because the
    contents are generated randomly.
README clarify that vcloud-login exports env var.
Don't run Fog::Login.token integration tests

Make these manual for the reasons described in the comment. Opting for this
convention, which we've used elsewhere, because `pending` looks too much
like a temporary failure.
Merge pull request #93 from gds-operations/vcloud_login_token_tool

[#68989754] Add vcloud-login utility for session tokens
Consolidate jenkins test scripts

There was a lot of duplication between these scripts. Whereas the only
differences were us not doing the following in `jenkins_integration.sh`
which is run against Carrenza:

- Not running unit tests. Which are fast and we wouldn't want to run the
  integration tests if they do fail.
- Publishing the gem. Which I've left in the origin `jenkins.sh`.

We can later change the Carrenza job to run `jenkins_tests.sh` directly and
delete `jenkins_integration_tests.sh`.
Use vcloud-login for integration tests

Writes a temporary FOG_RC containing the API host and username which is used
by both vcloud-login and the integration tests.