Commit Graph

734 Commits

Author SHA1 Message Date
OpenDev Sysadmins 062aa78e72 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:07 +00:00
Dougal Matthews b129603824 Retire the Tuskar codebase
Change-Id: If724a2cbde086d4c4341539a2e51ee4fd1915a26
Depends-On: I904b2f27591333e104bf9080bb8c3876fcb3596c
2016-01-22 11:25:51 +00:00
OpenStack Proposal Bot 3e67a04813 Updated from global requirements
Change-Id: I4c354d368a0585a9a81f858a63983fcc980c75a5
2015-09-22 03:37:59 +00:00
Jenkins 40b2de1531 Merge "Switch from MySQL-python to PyMySQL" 2015-09-21 20:44:21 +00:00
Sergey Vilgelm e8eac7e562 Fix the unit tests with wrong usage of mock
Replace assert_called_once() with self.assertEqual(1, <...>.call_count).

Change-Id: Ied357c86ba7d62c419d01a75b099a6c5de479d6e
Closes-Bug: 1473369
2015-07-26 16:33:43 +00:00
Jeremy Stanley 25195b1302 Switch from MySQL-python to PyMySQL
As discussed in the Liberty Design Summit "Moving apps to Python 3"
cross-project workshop, the way forward in the near future is to
switch to the pure-python PyMySQL library as a default.

https://etherpad.openstack.org/p/liberty-cross-project-python3

Change-Id: I5d2a9ec4cd52b81b715003e58e593f8395e66959
2015-07-03 22:02:17 +00:00
Jenkins 64926ca8e0 Merge "Added --all flag to tuskar-delete-roles" 2015-07-02 16:16:29 +00:00
Jenkins d820ef3ce1 Merge "Change default auth type to keystone" 2015-06-22 08:41:53 +00:00
marios 0bfaf4c7af Propagate default values for parameters from the master seed
Some parameters like ServiceNetMap are defaulted in the master_seed
template. If there is no default set for this parameter in any of
the role templates where it is used, propagate the default value
from the master_seed to that role (overcloud-without-mergepy.yaml).
The default value is also included in the environment file

Change-Id: I1ff97ccabf6be6afba03fc08f817c0d98f554ed2
2015-06-15 09:26:17 +03:00
Jay Dobies e15b43f054 Added --all flag to tuskar-delete-roles
This is mostly for development purposes, but when working on the TripleO
Heat Templates, it's common to flush out all of the existing roles from
Tuskar and load in the changed ones. It was tedious to do when
specifying all of the UUIDs, so this is provided as a shortcut.

Change-Id: Ib8063eb7aa737a71b208a142318ea62c02b039a7
2015-06-12 14:08:56 -04:00
marios 5216668c80 Alter the type for the contents column of stored_file
This was previously set as a Text() which is limited at 65535 [1].
Add a wrapper to use the mysql long text column when applicable (adapted
from Heat [3]).

[1] https://mariadb.com/kb/en/mariadb/data-types/
[2] http://docs.sqlalchemy.org/en/latest/core/type_basics.html#vendor-specific-types
[3] https://github.com/openstack/heat/blob/master/heat/db/sqlalchemy/types.py#L24

Change-Id: I826686e33ba2716108c30ca3dac7ea66f079e1c0
Closes-Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1222718
Co-Authored-By: jason.dobies@redhat.com
2015-06-04 11:25:10 +03:00
Jenkins 413bf52ab4 Merge "Added removal_policies support for role resource groups" 2015-05-27 12:10:36 +00:00
Jay Dobies e3e82f2a98 Change default auth type to keystone
Change-Id: Icf6c9f7f4f302450e162627d9666ab97c2be8b75
Depends-On: Icf8ccc2b802315cb77898f363bcf9cf89cb46e8e
2015-05-22 15:17:54 -04:00
OpenStack Proposal Bot ca6e9d972b Updated from global requirements
Change-Id: Ia713ee1a197d068de05865c30a7bef5e560db8b8
2015-05-14 22:50:14 +00:00
Jay Dobies ea39348b89 Added removal_policies support for role resource groups
Defaulted to [] which means it shouldn't affect anything unless it is
explicitly set.

Change-Id: Ie698cabec039b4bb0bbdf1d32c6dbfbfac9e24b0
2015-05-14 14:17:48 -04:00
Jay Dobies f06e9d80e8 Avoid MODULEPATH environment var in config generator
generate_sample.sh fails if MODULEPATH is already set. This fix was
adapted from a change in nova: https://review.openstack.org/#/c/168745/

Change-Id: I2b0b52b5d71157a42028d95d84e36eeb0fe3016d
2015-05-11 15:13:49 -04:00
Doug Hellmann da38971472 Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: Id25875f3ef51c2b84cf2b9362039a5196feaa531
2015-05-06 20:07:35 +00:00
OpenStack Proposal Bot 7364d88a02 Updated from global requirements
Change-Id: I61266449120ef44bb6fdc95f767db38b5382c3a9
2015-04-23 15:37:02 +00:00
marios b10d4a65e5 Wires up constraints and type into returned plan parameters
Though constraints and type are both plumbed into the parsing
and storage models, for some reason these were not being captured
in the generated Plan object returned to the client. This adds
those missing attributes of Plan parameters. Also updates the
docs to reflect the "new" attrs

Change-Id: I138818daef38f084acd6e2250986351352b3835d
2015-04-20 12:04:14 +03:00
OpenStack Proposal Bot ee55408acb Updated from global requirements
Change-Id: I7908128b82e80f347f4e6014301d7ed8a2e6b2d7
2015-03-31 18:39:46 +00:00
Jenkins 451f843349 Merge "Include missing aliases in resource registry" 2015-03-31 14:38:42 +00:00
Jenkins 0d4d98d6d5 Merge "Add registry_path to the Role object" 2015-03-31 14:38:32 +00:00
Jeff Peeler a01dac6668 Include missing aliases in resource registry
When loading the seed, resource registry entries referencing other files
was recently added to the final environment. However, other aliases were
skipped and this should not be the case.

The test_load_roles is the primary verification, but having another
example in the test_parser is helpful for awareness.

Change-Id: I28c8175140f45a1769eb372edcffb3f78bdd780f
2015-03-30 09:44:43 -04:00
marios beebb5e41b Add registry_path to the Role object
Now that we have decoupled the Role name from the name of the file that
defines it, there is no longer a link between a Role and the resource
registry type that it defines. For instance, there is no link between
'Compute' and the relevant entry in the resource registry:

OS::TripleO::Compute: puppet/compute-puppet.yaml

When loading the role, capture its file as part of the Role object so
that we can dereference the Role name against the resource registry,
regardless of name.

Change-Id: I0d36355dbf4e296584d05bf5a137926f85a78b43
2015-03-29 12:45:00 -04:00
Jeff Peeler 83e5c1f8e9 Make attribute name match resource name
In aa754741a3, the -servers suffix was
dropped, so the name used from the resource group (for example in the
seed template) needs to also drop the suffix.

Have grepped the source for any remaining "-server" strings, so I think
this completes the transition.

Change-Id: I0366953e1186c0aeddf1cfbf5814c6fdf4312279
2015-03-27 11:56:12 -04:00
Jeff Peeler 8cb3606a61 Fix parameter default when empty list is used
The parameter default value was not properly being used upon copying
to the environment, resulting in an empty string rather than an empty
list.

Change-Id: I4cf0f29e01661f3059686fb0403aebe0fe912db1
2015-03-26 17:51:31 -04:00
marios f2365f33cc Resolve template extra-data relative to the template prefix if any
When generating overcloud templates, tuskar includes non role
templates that are read from the resource registry (environment.yaml)
These templates typically include a path in their name, like
'puppet/compute-post-puppet.yaml'.

The resource registry templates can also include extra-data and
so when these are resolved, include the prefix path from the name.

Change-Id: I43b6aa5eb96c7bcade501b01f0ce93353e65af64
2015-03-23 20:38:13 +00:00
marios cf604be22e Adds tuskar-load-role to load a single role and associated extra-data
This adds a stand-alone tuskar-load-role command which takes a name
and path to the main file defining this role. If no name is provided
this is deduced from the path (filename) as currently occurs with
tuskar-load-roles. If a path is not specified then a SystemExit
occurs.

This also wires up the relative_path into the role creation
(this is added to the model by the parent commit)

Optionally you may specify the extra-data files that the given role
uses as multiple '--extra-data' arguments to tuskar-load-role.

Change-Id: I9c143afb52c43e4258c3a6797a9707c08d8dcdaf
2015-03-23 14:25:02 -04:00
Jeff Peeler 2ddbb23c08 PEP8 check H105 prohibits using author tag
Removing these author lines so that gate tests can pass. Failure
snippet:

pep8 runtests: commands[0] | flake8
/home/jenkins/workspace/gate-tuskar-pep8$
/home/jenkins/workspace/gate-tuskar-pep8/.tox/pep8/bin/flake8
./tuskar/api/hooks.py:4:3: H105  Don't use author tags
./tuskar/common/service.py:5:3: H105  Don't use author tags
./tuskar/tests/api/api.py:4:3: H105  Don't use author tags
./tuskar/api/acl.py:4:3: H105  Don't use author tags

Change-Id: I0e6727a6b531a0c9e8fcd8887310603f4f673b22
2015-03-23 14:25:02 -04:00
Jenkins b5a4dc37be Merge "Add relative_path metadata to a stored file" 2015-03-23 08:07:08 +00:00
Jenkins ab7b2199af Merge "Adds tuskar-delete-roles command" 2015-03-20 18:39:43 +00:00
Jay Dobies 285e7ef962 Add relative_path metadata to a stored file
This field is optional and can be used to carry information on the
directory structure expected for role templates.

Change-Id: Ic68ac09196de7604466a45f2dd929544597c1b9f
2015-03-20 14:21:19 -04:00
marios bcb854540e Adds tuskar-delete-roles command
The current Tuskar API doesn't cover the role resource lifecycle.
For development purposes there is no easy way to delete existing
roles that were created with tuskar-load-role and friends.

This review adds a tuskar-delete-roles utility that takes a --uuids
list of ids to delete. If any of the specified role uuids do not
exist, an unknownUUID exception is raised. If any of the specified
uuids are in use by an existing plan, a OvercloudRoleInUse exception
is raised. In case of either of the above, no roles are deleted and
the operation exits.

The --dryrun flag can be specified which still goes through the
validation above but still does not perform any deletions when
that passes.

Example invocation:

tuskar-delete-roles --config-file ~/tuskar.conf --dryrun --uuids
    c3b43c3c-e69b-4db7-b0df-3bf2bb8c04cf
    5cffe8b6-df60-4cc6-92c6-c8067f0067eb

Change-Id: Idb397fd0d6d35b143646d42b171deebc1bce6b36
2015-03-20 13:21:23 +02:00
Jeff Peeler aa754741a3 Change role to use only name part in attributes
The resource name in the master template no longer requires the
name+version+"-servers" suffix.

Change-Id: I991a9720d0beadbcd29a5266a40c9033df0466b0
2015-03-19 16:54:25 -04:00
Jeff Peeler 9fe1c3a893 Add a tuskar-load-seed command
This command is essentially the tuskar-load-roles functionality broken
out specifically to handle just the master seed (and the required
resource registry). Example usage:

$ tuskar-load-seed --config-file etc/tuskar/tuskar.conf --master-seed
~/tripleo-heat-templates/overcloud-without-mergepy.yaml --resource-registry
~/tripleo-heat-templates/overcloud-resource-registry-puppet.yaml

Subsequent runs will update the templates which is the same behavior as
the tuskar-load-roles command.

Change-Id: I07450edebd0dacd86bd0b28665eb1aaa3ea30ecb
2015-03-17 23:31:44 -04:00
Jeff Peeler 097920e78f Factor out role load code
This paves the way for loading roles in separate steps with different
executables rather than just one load operation.

Change-Id: I4eec7548837e19b7bc50616ba7e5355a0b86261c
2015-03-16 16:09:08 -04:00
Jenkins 0cfe077732 Merge "Simplify loading roles" 2015-03-16 18:34:07 +00:00
Jenkins 361d6868ca Merge "Updated from global requirements" 2015-03-16 09:04:54 +00:00
Dariusz Smigiel (dasm) 06439ca61b Simplify loading roles
The same block of code was repeated several times in whole function.
Replace it with one, reusable function to prevent from possible
problems and simplify usage.

Change-Id: I4dbddcf1b361b59344a7bc15a793c568dba00f13
2015-03-12 22:08:01 +01:00
Jenkins a3ed62672d Merge "Adds the /role/role_id/extra_data path to the v2 API" 2015-03-12 15:09:57 +00:00
marios 6e5d0ce968 Adds the /role/role_id/extra_data path to the v2 API
This uses the new TemplateExtraStore to process stored extra-data
files and match them against the template for each defined role

This information is included when a client requests the existing
/plans/plan_uuid/templates path. To retrieve the extra-data for
any particular role a new /role/role_uuid/extra_data path is added

Change-Id: Ic52280248b0d169f4a3c27e10a826d3dbb2b9bf3
2015-03-11 17:28:28 +02:00
Dougal Matthews 0482879bb8 Remove --dry-run from load_roles
The dry run flag isn't currently dry as the database is changed even if
it is enabled. This change removes the feature as it was never
particularly useful.

Change-Id: I7f796aa2ef2759ade3827db68b86d463f2db7fed
2015-03-10 11:40:41 +00:00
marios 472d69fd96 Adds support for --role-extra files for extra template files
This enables use of '--role-extra /path/to/file.yaml' to specify
extra template files that are included in the main role templates
(via 'get_file' directives).

  tuskar-load-roles --config-file ~/tuskar.conf
  --master-seed $DIR/overcloud-without-mergepy.yaml
  --resource-registry $DIR/overcloud-resource-registry-puppet.yaml
  -r $DIR/puppet/compute-puppet.yaml
  -r $DIR/puppet/controller-puppet.yaml
  --role-extra $DIR/puppet/hieradata/common.yaml
  --role-extra $DIR/puppet/hieradata/compute.yaml

Includes basic testing for load-roles with --role-extra and also
exercises the (internal) role-extra name generation code

Change-Id: I738f07b0b3d056b804394e57392b636d8fdf55fd
2015-03-09 18:57:03 +02:00
OpenStack Proposal Bot c14d371fc2 Updated from global requirements
Change-Id: I2b0177f636bf23ab2915970b9782a2afacc3c52f
2015-03-07 00:24:02 +00:00
Jeff Peeler d4785d9c2c Support non-role resources in resource registry
This change allows for resources utilized in the master seed that are
specified in the resource registry, but are not a provider resource to
be stored and saved to disk. There is no additional information required
to pass as all the data is stored while loading roles.

Previously tuskar always assumed that there was a 1:1 correspondence
between the final resource registry and the number of roles, but this is
no longer the case. The API for /v2/plans/templates has changed to
include non-role resources specified in the resource registry (CLI
operation tuskar plan-templates).

(Also, ignores tags file in git)

Change-Id: Ia15c0fdad0c036564b81f664e49fca280bc7ce7e
2015-03-04 17:54:58 -05:00
Victor Sergeyev 6c95d0387c Modify tuskar.conf.sample according to the new oslo.db release
Change-Id: Id7acfcef8c55025110a3d7f3146ca01b94253285
2015-02-26 11:37:52 +02:00
Jenkins f057e287f6 Merge "Fix the order of base classes in DB test cases" 2015-02-25 18:52:15 +00:00
Jenkins 7d8549ad87 Merge "Add devstack external plugin" 2015-02-25 15:26:38 +00:00
Roman Podoliaka 3112eaff04 Fix the order of base classes in DB test cases
Next release of oslo.db is going to break Tuskar DB tests: when
a test case cleanup is run, it fails to fetch 'schema' attribute of
oslo.db base test case, set in its setup. The problem is that Tuskar
base test case intentionally removes all attributes from a test case
class instance in its cleanup callback (to ensure there are no memory
leaks).

So in order for Tuskar unit tests to work correctly with new release
of oslo.db we need either to remove inheritance from Tuskar base test
case or to change the order of base classes to achieve the 'proper'
MRO for DB test cases.

In future, oslo.db is going to introduce a DB fixture instead of a
base test case class to avoid such problems with multiple inheritance.

Change-Id: Ia0ca1b261d707b6fbe349fd536599c845da0a2e9
2015-02-25 15:29:23 +02:00
OpenStack Proposal Bot febd5cdfb9 Updated from global requirements
Change-Id: Id46bf2a8b4442983ebad20371fcc1fb426d15901
2015-02-20 03:08:49 +00:00