33 Commits

Author SHA1 Message Date
Jenkins
1c7db8829e Merge "Add guard checks in _get_cpid_from_keystone." 2015-11-12 09:02:20 +00:00
david liu
c39c3c7981 Add guard checks in _get_cpid_from_keystone.
Closes-Bug: #1502949

Change-Id: I8e4bea2b5ab0e60d92fc07a5f0cfa60a7f84732d
2015-11-11 19:34:11 +08:00
Jenkins
0d9423ebc3 Merge "refstack-client default verbosity should be info." 2015-10-19 09:31:28 +00:00
david liu
960d675125 refstack-client default verbosity should be info.
Closes-Bug: #1493588

Change-Id: I1f0c99f2b08b706356d9206da196729488f3b09a
2015-10-15 14:45:05 +08:00
cdiep
84e4ef114d Update RefStack server URL to refstack.openstack.org.
Change-Id: I36308b2b0b15321369f2911f924653dddb2d089f
2015-10-12 10:53:43 -07:00
Daryl Walleck
02d9ba7529 Provides capability to use a Tempest accounts file
refstack-client currently uses the user information
provided in the identity section of the Tempest configuration
when determining the cpid. The account information from the
identity section has now been made optional and a secondary
option of using a yaml file with test account information
was added.

refstack-client currently is not aware of this accounts file
and will fail to run if the user is using only the accounts file
and has not filled in the user information in the identity
section. This change checks to see if the user has specified
an accounts file to use and reads the user data from there
when applicable.

Change-Id: Id5a5a1800febc23a1006b29e58fec05a3aa40af1
Closes-Bug: 1501903
2015-10-05 18:08:26 -05:00
Matthew Edmonds
d16248ff02 fix v2 fetch of Cloud Provider ID
Corrects a bug that caused retrieval of the keystone ID to be used as
the Cloud Provider ID to fail when using keystone v2.

Change-Id: Id378e8ff31472fd2eb194fd59ecd8042297229d8
Closes-Bug: #1497067
2015-09-17 20:09:37 -07:00
sslypushenko
ecba34b7dd Remove dependency on admin creds
This patch changes the way refstack-client gets keystone service id.
Now non-admin creds should be enought for that.
This patch adds support for Keystone API V3.
Keystone API version selected from tempest.conf
Section: 'identity-feature-enabled', key: 'api_v3'

Closes-Bug: #1495671
Change-Id: I1f9edffba88cf99c39b2c8b99f792088d35dbd2e
2015-09-17 19:18:21 +03:00
cdiep
bd2205afc0 Update refstack-client to reflect movement to openstack namespace.
Change-Id: I65a1c0ab2658a0f5662ccafd49bc38557c63af2a
2015-09-14 09:45:45 -07:00
Paul Van Eck
1cb14d52c5 Allow insecure keystone connection
Sometimes a keystone endpoint might have ssl issues, and you might
get an error like "certificate verify failed". This patch extends the
'-k/--insecure' arg to allow skipping ssl checks when connecting to
keystone.

Change-Id: Icd09aa9906cabc1f4f5ab635fb30fbcebbd37ced
2015-09-03 14:41:50 -07:00
cdiep
4d141d885e Rename "Refstack" to "RefStack"
The RefStack team has decided to use "RefStack" as the name of our
project.

Change-Id: Ibd3fa01f0904549f22eaf4883116631a4e5b3d01
2015-08-31 16:15:36 -07:00
Paul Van Eck
1ed86f22c0 Update default RefStack API endpoint
The refstack.net site was updated to use a single domain in order for
the new patches to work. Thus, the default api endpoint should reflect
the new api endpoint which is refstack.net/api.

Change-Id: Icc7b501a65792a79635c4a7263eb9a3e0767d33e
2015-08-19 08:22:08 -07:00
sslypushenko
67de4f69dc Add command to generate pubkey's signature
Uploading public key in to Refstack requires pub key self-signature
This signature can be generated with refstac-client using "sign"
command. For example:

./refstack-client sign ~/.ssh/id_rsa

Will print public key ~/.ssh/id_rsa.pub and self signature for it.

Change-Id: I0ee3e89c5e8bcae85eae63500a5fd98cea12c273
2015-08-19 12:48:02 +03:00
Paul Van Eck
43777f9820 Add argument for specifying test-list directly
Because test attributes can constantly change in test lists, refstack-client
should have a native argument for passing in test lists (instead of '-- --load-list')
Refstack-client will normalize the tests in the given list by matching it to
test IDs in the current Tempest environment.

Closes-Bug: #1475407
Change-Id: I1e3f026f5cd706cf73b6febfce98cb96b742d4d6
2015-07-17 15:31:16 -07:00
Paul Van Eck
29c9ecea66 Replace -t with --
To better support passing in arbitrary arguments to the Tempest
runner, we now allow the '--' delimeter as an argument. Anything after
'--' will be passed to the Tempest runner as is. This better matches how
run_tempest.sh does things, and will make including test lists clearer.

Closes-Bug: #1467737
Change-Id: I8e091ef7c126cbeb4c388bb19e8343efb1c4c8ab
2015-07-08 23:18:05 -07:00
sslypushenko
3c37e809bb Allow to post results on https endpoint
Add key which alllows to drop ssl verification.
Without this patch it is not possible to post test results on
https endpoint with selfsigned sertificate.

Change-Id: Idd6b0e2f9ee1057f9ae1d3078f70a2cdcee4e360
2015-06-12 19:02:38 +03:00
sslypushenko
31cd05d8e1 Change defaults for --url
Defaults for --url param has been changed to env[REFSTACK_URL] if
it is set and 'http://api.refstack.net' if env[REFSTACK_URL] is not set.
It will be helpull during development and for upload to local refstack
server.

Change-Id: I8de8dfba1f6741133585815ace5cfd2ca2780fa2
2015-05-07 21:14:34 +03:00
sslypushenko
a84af82925 Show URL to test results page
User gets url to test results page after successfull upload.
Added 'list' command. It allows user to retrieve links on last uploaded
test results.

Change-Id: Id3a33179ad551cf95640d4c9fde147048592a1a4
2015-04-28 21:55:44 +03:00
sslypushenko
29bd7040d2 Post test results signed with RSA key
Added feature to upload test results in to Refstack API signed with
your personal RSA key. Just do upload with key '-i PATH_TO_PRIVATE_KEY'.
You can use your general OpenSSH key ~/.ssh/id-rsa or
generate a new one with 'ssh-keygen -b 4096'.

Change-Id: Icce6d7146f0fa9de892d1f4785ef24f17fc9b286
2015-04-13 22:01:03 +03:00
Paul Van Eck
748d259296 Add argument for renaming result file
A user can use the -r/--result-file-tag argument to change the name of the output
json file. The name will always include the subunit stream ID, for example if a user
input '--result-file-tag my-test' and the next-stream id was "2", the output filename
would be my-test-2.json.

Change-Id: Ie7302470fe1b63a21f61451ef62687634b6e0932
2015-02-26 13:51:31 +00:00
Jenkins
f1113714af Merge "Remove upload as default behavior after testing" 2015-01-28 21:27:47 +00:00
Paul Van Eck
0de601f65e Remove upload as default behavior after testing
The --offline argument was removed and an --upload argument was
added. Adding this argument will have your test results be uploaded to
the default Refstack API server or the server specified by --url.

Story: https://storyboard.openstack.org/#!/story/2000136
Change-Id: I93302e1cacdd9d0f996ea5545fbe21e1fb6aaa23
2015-01-28 11:48:04 -08:00
David Lenwell
51907ce792 Changed default url to api.refstack.net rather than .org
Change-Id: Ie5e70bb46eef6637066c8106e0b90d6c217d81b3
2015-01-23 01:28:00 -08:00
sslypushenko
9403991171 Updating tests results format according to spec
Spec:
https://github.com/stackforge/refstack/blob/master/specs/approved/api-v1.md

Update patch:
https://review.openstack.org/#/c/146680/

Change-Id: I75c62090a45d742b88acdfe080e24d62658976ce
2015-01-15 19:51:10 +02:00
Paul Van Eck
38e6276737 Added the actual post request to upload
Change-Id: I4297ec4c44c84c2c7b1fefe5f65eac55e5a6845e
2015-01-12 22:53:23 -08:00
Paul Van Eck
456b885255 Change returncode checking to file checking
Previously, after the run_tempest script, was run, all post-processing
was done only if the returncode was 0. If it was non-zero, an error message
was given. This was an oversight, as the run_tempest script will return a code
of 1 when any test case fails. This leaves the unintended side effect of refstack
not parsing the results or producing the output json when Tempest successfully
runs, but a test case fails.

Checking for the existence of the expected subunit file will at least validate
that the Tempest test was at least started successfully, and didn't fail to run
due to some misconfiguration in the environment.

Change-Id: I541b798db41b713525efeb8dedfb9347be780a3f
2015-01-07 10:54:55 -08:00
sslypushenko
13ea5ab160 Setup_env script should install Tempest from tag
setup_env script should be able to install Tempest from specific tag
release. Key -t added to setup_env script. It specifies Tempest tag
release which will be installed as a test runner. By default last tag
from Tempest github repository will be used. Installed by setup script,
Tempest test runner is only single available option for now. Because of
it, option --tempest-dir option is removed from refstack-client

https://storyboard.openstack.org/#!/story/309
https://storyboard.openstack.org/#!/story/324

Change-Id: I182c3870a7ce4bbcb188836d189538dfd54b1c26
2014-12-12 14:10:13 +02:00
Paul Van Eck
6c3f3a1a02 Add ability to upload test results
Split refstack-client into two subcommands: upload and test.
The 'test' command will run Tempest like before, while 'upload'
takes in a result file argument and will upload it to the Refstack
API url. Testing with refstack-client now saves a JSON result file
containing the content of what will or would be posted to the
Refstack API.

Change-Id: I28bcb75b51b77872f39e144ae8ffa7e64b26b233
2014-10-26 18:03:43 -07:00
sslypushenko
6e6ced6436 Replace setup_ubuntu_env.sh to universal script
Ubuntu setup script removed.
New setup script was tested on latest vesions of ubuntu, debian, centos
and fedora instalations.

Change-Id: I94cff68de15d44f420e56c7793ed18476e07b442
2014-10-13 20:59:04 +00:00
Paul Van Eck
0ed9076d10 Handle non-zero exit codes from tempest script
Normally, catching a subprocess.CalledProcessError would suffice
since that exception is thrown when the subprocess exits with a
non-zero code. However this exception is only thrown when using
specific methods like check_output which we no longer use.

This commit now has us explicitly checking the process return code.

Change-Id: I799f92836fba41e718570e2f7affb27f11c26156
2014-10-02 13:09:34 -07:00
Paul Van Eck
768b4676a1 Refactor code and add more unit tests
Refactoring was done to make more of the methods easier to test.
Existing unit tests were adjusted/simplified and more tests were
added as a result.

Change-Id: I57c334c6a11fa8e12c88bdd0788d63a35cdfd7bc
2014-10-02 12:08:39 -07:00
Paul Van Eck
54a24f36a9 Add argument to disable data upload
Added an --offline argument which will prevent Tempest results
from being uploaded to the Refstack server if used.

Change-Id: I40df179288354a6eb7fac1d0ed634d722a780817
Story: https://storyboard.openstack.org/#!/story/190
2014-09-24 16:29:53 -07:00
sslypushenko
65538f145d Rename refstack-client to refstack_client
This renaming and change of project structure is necessary for adding
the unit tests.

Change-Id: I1893afbb05c86c83312983b12ce601d59a7fb417
2014-09-23 15:17:17 +03:00