Commit Graph

185 Commits

Author SHA1 Message Date
Liam Young
f0d91ae31b Fix caching of model name and remove debug lines 2018-06-14 06:23:26 +01:00
Liam Young
9b26376a19 A few fixes 2018-06-14 06:20:05 +01:00
Liam Young
9d06bb890f Move call to get_juju_model() down to run_in_model
Currently interacting with functions in zaza.model requires the
model to be passed in. This has resulted in multiple calls to
get_juju_model(). It is cleaner to push these calls down into
the model wrapper and make the model_name an optional
argument. In addition, the current model name is now cached
without having to check the os.env each time.

Unfortunately this has resulted in the signature changing on a
great many function so this diff is bigger than would normally
be desirable.
2018-06-14 06:19:26 +01:00
David Ames
7b10df57d8 Merge pull request #61 from gnuoy/remove-timeout-workaround
Remove workaround for libjuju timeout bug
2018-06-13 15:18:15 -07:00
David Ames
eaab059c62 Merge pull request #67 from gnuoy/more-docstring-tidy
More docstring tidy
2018-06-13 15:17:38 -07:00
David Ames
30a290d90a Merge pull request #65 from gnuoy/switch-to-zaza-controller
Remove duplicate functions for add/remove model
2018-06-13 15:01:45 -07:00
Liam Young
3b10baf5ea Restore unit_tests to pep8 coverage 2018-06-13 13:36:55 +01:00
Liam Young
c2b8992b2e More docstring tidyup 2018-06-13 13:35:32 +01:00
Liam Young
0aa7c61719 Remove duplicate functions for add/remove model
Recently functions were added to zaza.model for adding and removing
models. These duplicated existing functions in zaza.controller.
Given these functions act against the controller, zaza.controller
feels like the correct location. In addition the implementations in
zaza.controller correctly handle disconnects which the new ones
did not.
This PR removes the duplicates and points any existing references
from zaza.model to zaza.controller. Finally, docstrings were added
and documentation links.
2018-06-13 09:49:33 +01:00
Frode Nordahl
a0e9064f2b Merge pull request #62 from gnuoy/remove-model-subprocesses
Use libjuju for adding and removing models
2018-06-07 10:33:07 +02:00
Frode Nordahl
85b8c88628 Merge pull request #63 from gnuoy/doc-tidy
Documentation fixes
2018-06-07 10:29:05 +02:00
Liam Young
0353d300e1 Fix typos 2018-06-07 09:25:07 +01:00
Liam Young
0568fd17b7 Fix lint 2018-06-07 09:06:13 +01:00
Liam Young
0b6f6d88dc Documentation fixes 2018-06-06 15:54:06 +01:00
Liam Young
b21767ce52 Use libjuju for adding and removing models
libjuju supports adding and removing models so replace calls out
to subprocess with libjuju calls
2018-06-06 12:28:08 +01:00
Frode Nordahl
1f665f6ac2 Merge pull request #60 from gnuoy/doc-update
Split up docs and reformat
2018-06-06 11:25:35 +02:00
Liam Young
0a8ac0faa4 Fix truly awful spelling mistakes 2018-06-06 10:22:14 +01:00
Liam Young
01bd9b88c9 Remove workaround for libjuju timeout bug
The timeout bug for libjuju run has been resolved:

462989bbd9

so remove workaround.
2018-06-06 09:53:16 +01:00
Liam Young
056d2f41c2 Split up docs and reformat
* Move contents of ./zaza/charm_lifecycle/README.md into docs
* Split up api docs into seperate pages
* Fix prepare command help string
2018-06-06 09:38:13 +01:00
Frode Nordahl
d1a5b67d8c Merge pull request #58 from gnuoy/bug/fix-keystoneless-vault
Skip csr client tests if there is no client
2018-06-05 17:40:02 +02:00
Alex Kavanagh
12c52b62b1 Merge pull request #59 from gnuoy/docington
Switch to sphinxcontrib-asyncio for sphinx asyncio support inline wit…
2018-06-05 15:46:06 +01:00
Liam Young
f1e1a80cb1 Switch to sphinxcontrib-asyncio for sphinx asyncio support inline with libjuju 2018-06-05 15:34:01 +01:00
Liam Young
fec2acfa9d Skip csr client tests if there is no client 2018-06-05 15:27:36 +01:00
Alex Kavanagh
a46499b362 Merge pull request #57 from gnuoy/combine-requirement-files
Converge requirements into a single file
2018-06-05 14:39:12 +01:00
Liam Young
7b45197476 Converge requirements into a single file
readthedocs wants a single requirements file and since the doc
requirements are small it seems reasonable to merge the
requirement files.
2018-06-05 14:29:10 +01:00
Frode Nordahl
1249643fdf Merge pull request #56 from gnuoy/missing-glance-client
Add missing glance dependency
2018-06-05 12:49:58 +02:00
Liam Young
b3060f96ce Add missing glance dependency 2018-06-05 10:01:54 +00:00
David Ames
031e2eb9c4 Merge pull request #54 from gnuoy/glance_tests
Add tests for testing the glance charm
2018-05-31 10:52:22 -07:00
Liam Young
6c12a8104d Fix unit test 2018-05-31 10:30:28 +01:00
Liam Young
76c539bae8 Fix typo 2018-05-31 09:23:40 +01:00
Liam Young
12317054d2 Lint fixes 2018-05-31 09:06:03 +01:00
David Ames
4c3fcd0ea2 Merge pull request #55 from gnuoy/sphinx
Add a bit of sphinx
2018-05-30 09:47:40 -07:00
Liam Young
7517faf19a Add a bit of sphinx 2018-05-30 15:29:45 +01:00
Liam Young
56c8d60dcd Add tests for testing the glance charm
* Add OpenStackAPITest class which can be used by OpenStack API
  charms. It provides the framework for common tests like pause
  and resume. It also provides lower level entites like an
  authenticated keystone session.
* Add generic openstack resource managment functions to
  zaza.utilities.openstack. These are based on existing functions
  in charmhelpers. Main difference is that they use tenacity to
  manage retry logic and throw AssertionError if then required state
  is not reached rather than returning True/False
* Add image management functions to zaza.utilities.openstack.
* Add set of glance setup/configuration/tests. These are equivalent
  to the existing glance amulet tests with all the introspection
  tests removed (see below for more detail).

Tests replicated here:
    test_410_glance_image_create_delete
    test_411_set_disk_format
    test_900_glance_restart_on_config_change
    test_901_pause_resume

Tests removed
    test_100_services
    test_102_service_catalog
    test_104_glance_endpoint
    test_106_keystone_endpoint
    test_110_users
    test_115_memcache
    test_200_mysql_glance_db_relation
    test_201_glance_mysql_db_relation
    test_202_keystone_glance_id_relation
    test_203_glance_keystone_id_relation
    test_204_rabbitmq_glance_amqp_relation
    test_205_glance_rabbitmq_amqp_relation
    test_300_glance_api_default_config
    test_302_glance_registry_default_config
2018-05-30 13:40:50 +01:00
Frode Nordahl
f724044e4a Merge pull request #53 from gnuoy/more_blocks
Another batch of zaza.model helpers
2018-05-22 16:51:18 +02:00
Liam Young
313f7bee02 Remove debug print 2018-05-22 15:34:58 +01:00
Liam Young
86d641e333 Minor tidy 2018-05-22 15:33:34 +01:00
Liam Young
cbc14e32c6 Another batch of zaza.model helpers
This pr adds a number of new fuctions to zaza.model. As discussed
zaza.model needs to be broken up as it has become too large. I would
like to continue the discussion around that and submit a subsequent
patch for that at a later date.
2018-05-22 15:28:28 +01:00
Liam Young
41b234e1f6 Merge pull request #52 from fnordahl/add-loglevel-command-line-argument
Add command line argument to set loglevel
2018-05-22 08:14:15 +01:00
Frode Nordahl
4f2abc87c8 Add unit tests for loglevel command line argument parsing 2018-05-22 09:05:44 +02:00
Frode Nordahl
d28784ce9c Add command line argument to set loglevel 2018-05-17 00:29:09 +02:00
Liam Young
8ca82a6dd5 Merge pull request #48 from openstack-charmers/dragent-infer-asn-from-deployment
Infer ASn from deployment for BGP speaker test configuration
2018-05-16 08:49:44 +01:00
Frode Nordahl
7a9d11973e Correct parameter name in docstring 2018-05-16 07:10:54 +02:00
Frode Nordahl
c4c2075532 Add unit test for model.get_relation_id() 2018-05-16 07:10:31 +02:00
Frode Nordahl
64b2d3de8b Infer ASn from deployment for BGP speaker test configuration 2018-05-15 21:59:19 +02:00
Liam Young
bb2d3531b4 Test Vault certificates relation (#49)
* Test vault issuing certs

* Fixes to bring tests inline with helpers

* Update action name
2018-05-15 15:02:06 +01:00
Frode Nordahl
3684d199d5 Fix incorrect import
setup_logging() moved from utilities.generic -> utilities.cli
2018-05-15 08:17:12 +02:00
Frode Nordahl
8655e2d684 Merge pull request #50 from thedac/controller
Controller Module and Functional Break up of Utilities
2018-05-14 20:00:51 +02:00
David Ames
ab431a58ad Fix misspelling of utilities 2018-05-14 10:49:49 -07:00
David Ames
a73f513b97 Shortname utilitites 2018-05-14 10:49:49 -07:00