2 Commits

Author SHA1 Message Date
John Dewey
c911ba58a7 All tests should be using spec_helper
Not every test is utilizing spec_helper.  Clean up tests
so they are consistent with our other openstack tests.
Also, #require_relative allows you to load a file that
is relative to the file containing the #require_relative
statement.  We should update the remaining cookbook
tests to use this.

Change-Id: Iea7e94789629956458a0ec60a10ab8af0d7fae52
2013-06-03 10:19:28 -07:00
Craig Tracey
88603d00b6 Add a new PrettyTable parsing function
The current state of (at least some) OpenStack CLI tools do not provide a
mechanism for outputting data in formats other than PrettyTable output.
Therefore this function is intended to parse PrettyTable output into a
usable array of hashes. Similarly, it will flatten Property/Value tables
into a single element array.

This change adds a parser as well as the associated rspec tests for that
parser. The initial use case for this function is to allow the Identity
LWRP to replace HTTP/S calls with Identity CLI calls. As much of what
happens with the CLI involves chaining UUIDs, this function is critical
to make that happen.

Note well: bumping the version of this cookbook to 0.2.1

All tests pass.

Change-Id: Icac7fcd1670f3240d59b07fce25cf8283ba2e0d8
2013-05-20 15:33:28 -04:00