* min value was set in consts
* appropriate validator was added
* tests for validator were changed
* test for serializer were changed
Change-Id: Ib8ccb0658bd401ce492257f855013d1d7e0f2dac
Closes-Bug: #1653081
* min value was set in openstack.yaml
* appropriate validator was added
* tests for validator were changed
* migration node and release attributes was added
* tests for migration were added
Change-Id: Iec723c7f02e874bf8567665a30af30c61aff7f34
Closes-Bug: #1653081
If there is no specified hugepages or CPU pinning
distributors shouldn't be called. Also changed
initialization of custom_hugepages type.
Change-Id: Iedb819b1da7dcb3877a6a94b9e7cfb93aa949a9e
Closes-Bug: #1594443
(cherry picked from commit 661ce479a6)
Provide ability for plugins to add additional attributes for nodes.
* Added new NodeAttributesDefaultsHandler handler for getting
default node attributes.
* Added code stuff for getting and updating additional plugin
node attributes.
* Added code stuff to serialize plugin node attributes for orchestrator.
Change-Id: I5c6d6f3c815a034683e624b98fa1f360ab4b491c
Implements: blueprint nics-and-nodes-attributes-via-plugin
Lack of testing was found, it's impossible to specify hugepages if
host supports only 2M huge pages due to incorrect validation.
This reverts commit 9bd61c68dc.
Change-Id: I7945d165764608ca7ee8ac5f46463267718678f5
If there is no specified hugepages or CPU pinning
distributors shouldn't be called. Also changed
initialization of custom_hugepages type.
Change-Id: I3835c9d163ba2692adf34193b57510060158b8e3
Closes-Bug: #1594443
It's a common task to get list of something from URL,
so let's add this get_param_as_set function and use
it where possible.
Change-Id: I4ae28553117f5ae4de35350270a40e3ac6beaf41
Partial-Bug: #1593751
Unfortuanately json schema validators don't allow specifying more human
friendly message as an alternative to complex regex patterns. So, the
only way is to perform hostname validation "manually".
Change-Id: Iee1717a3034fe4e33569fbeff6553b5bc949605e
Closes-Bug: #1567875
Since there are a couple of places where models for
restrictions is initialized, it's moved to cluster object.
Also, comments from previous commit
(Ibba7951968cbafd59fff0d516e74f9dd9e454edc) are fixed
It's refactoring bug is not needed.
Change-Id: Ic499a5deefb12740ebedc630b024dae0b4248ec5
When you do PUT request to NodeCollectionHandler
it's possible to provide some unexistent roles,
which results in broken UI. Because it tries to
get some info about these roles to display.
Fixes-bug: #1539733
Change-Id: I3b5070ca36589be3fa8488717e99823e253089ca
Since Nailgun contains attributes restriction
mechanism it's possible to verify attributes
restrictions. This commit applies restrictions
checks into validation for both node attributes
and cluster attributes.
Change-Id: I269da9a7a7df5fea336c07784b37d6ced1641993
Closes-Bug: #1567394
TaskDeployGraph and DeploySelectedNodesWithTasks handlers
now validating data using deployment graph type
Change-Id: I0f7b19a9695bd2ed608d2bf3b6dd28ae91bc86e2
Partial-Bug: #1567504
nailgun.errors have a huge set of exceptions but without hierarchy. This
patch remove exception generation from dict and make it explicitly with
python classes and add some exceptions hierarchy. Now all network errors
inherit from NetworkException and same for other exceptions.
Change-Id: I9a2c6b358ea02a16711da74562308664ad7aed97
Closes-bug: #1566195
Replacing map with for loops or list comprehensions in areas
where they where used improper.
Change-Id: I094abb3c6ec3c041f0fff6aed0c456158e1cc8f7
Closes-Bug: 1567849
Validator checks that node have enough memory to allocate all required
hugepages
Change-Id: I6b4e963548a673d3a86d3b4cc06529701c8d0a85
Implements: blueprint support-hugepages
Depends-On: Id5898f0b3e193fbd6267975d0ec70ef72cbce789
Validator checks that node have enough cpus and at least one unassigned
cpu for operating system.
Change-Id: Ie4ee247de55882232e256ed8744edf997c170c40
Implements: blueprint support-numa-cpu-pinning
Depends-On: I3502f484bd0d8222ad22500f42cc16cfb751042f
To avoid confusion with objest.DeploymentGraph and
orchestrator.DeploymentGraph second one was renamed
to the GraphSolver because this entity is used to
find subgraphs, loops, and solve graph for the
old orchestrators.
Secondary changes:
DeploymentGraphValidator -> GraphSolverValidator
DeploymentGraphTasksValidator -> GraphSolverTasksValidator
GraphVisualizationValidator -> GraphSolverVisualizationValidator
validators/graph.py -> validators/orchestrator_graph.py
orchestrator/deployment_graph.py -> orchestrator/orchestrator_graph.py
Change-Id: Ic42a17115723b8145b9d94cc034bf2217d1d634b
Implements: blueprint custom-graph-execution
Handler will return output of the same serialized graph used for
deployment in json format. And it will be available using next uri
GET clusters/<:cluster_id>/serialized_tasks?nodes=1,2,3&tasks=task1,task2
Expected return codes are the following:
200 - serialized tasks returned
400 - task based deployment is not enabled for cluster
400 - Nodes dont belong to same cluster
404 - cluster or nodes - not found
implements blueprint serialized-graph
Change-Id: I170011778296acdb977f9d938c062f14c1c3d556
When you tried to add node that is not added to cluster you got 500
error. Now this situation is handled and 400 is returned along with an
explanation
Change-Id: I8fd20c7a862caccd9c778672d4527343386a5d5a
Closes-bug: #1508398
Validator was tweaked to check if node cluster is the same as node group
cluster.
Change-Id: I5021c21fce736d595c604981d8c53cf0dde495ba
Closes-bug: #1508395
API validator checks for existence of a node group. In the case
where a specified group does not exist it returns the proper status
code and error message.
Change-Id: I58ae9094046e5f261839ec90eaac79e639dbfb4d
Closes-bug: #1494835
Extension specific validators should not be hardcoded
in the core.
Implements blueprint: volume-manager-refactoring
Change-Id: Ie821eb05774ef07a5e5a897d9542c1762579603f
* Extended db model with field 'hostname'
* Added hostname validation in API node handler
Change-Id: If18d00612140dcaaeec23bea172dcf6490186e5d
Implements: blueprint node-naming
Add an attribute 'keep_data' to list of attributes of a
partition to indicate that data on that partition must
be preserved during provisioning and deployment of the node.
Change-Id: I5a6660c59d230632499de89c2eb17ce718e7481e
Implements: blueprint partition-preservation
Added new exception 'NoDeploymentTasks' which is raised when user
is trying to manually deploy cluster whose release has empty
'deployment_tasks' and 'fuel_version' >= 6.1
Added loading of fake deployment tasks in both test Environment class
and 'loaddefault' command - so it also works in fake mode.
Change-Id: Ibaee6912cfbca27dbb35c4f9c09feb74c81b02a1
Closes-Bug: #1448066
Running deployment on nodes that are going to be removed from
cluster can lead to undesired destructive effects.
For particular case see related bugs.
In order to prevent such possibility - deployment action wil be
deprecated in case some nodes are marked for deletion.
User then will be able to remove them from deployment group,
or remove pending_deletion flag and deploy them - if pending_deletion
was set by mistake
Change-Id: I3622492ba5eeec3de8300effd0fa98602916601f
Related-Bug: 1454617
Closes-Bug: 1454622
In some cases (e.g. user is using CLI or API interface for deployment
of standalone controller node for cluster in ha mode) not all nodes
intended for deployment are yet provisioned. Separate validator added
for check such situation.
Change-Id: I7405ba54d90f6bc986befb5d035b213e4c0f6a73
Closes-Bug: #1415968
* added handler which allow to get a DOT representation of
deployment graph (full or selected tasks):
/api/v1/clusters/<id>/deploy_tasks/graph.gv
Colors for nodes in graph:
- groups - blue
- stages - red
- task that will not be executed - gray
- normal task - green
Available params:
- tasks - list of tasks that will be selected to make a deployment
- parents_for - show only predecessors/parents for given task
* added pydot-ng as a requirement
* in tox env always install newest package
Depends on: I706e18815f35904bf1f148edba818d281f2005b0
Change-Id: Id6fe85efe2549a63737ad50e5e55a70a480c83ab
Implements: blueprint granular-deployment-based-on-tasks
The DELETE method now returns task object that removes this node from DB and
from Cobbler. Also, DELETE method for collection has been added that accepts
a list of ids to delete and performs batched removal.
Change-Id: Ib976278eb5436d4dbb3d8b6be11a90902a0f8871
Closes-Bug: #1411200
Implements blueprint: node-removal-task
Related-Bug: #1405635
Current release's '.state' attribute is obsolete and do not used. It was
introduced a time ago when we had an RHEL support. So it could be
refactored to fit out current goals.
Since now there will be only two states:
* available
* unavailable
There is no way to start provisioning task for unavailable releases.
Change-Id: I8827c710da6e4f77a6397381d51fe25b87149462
Implements: blueprint downloadable-ubuntu-release
Next call will support tasks data:
PUT clusters/(?P<cluster_id>\d+)/deploy_tasks/
only received list of tasks will be executed
Introduced void type for task which will be used in order to not remove
concrete task and all edges with this task.
implements blueprint granular-deployment-based-on-tasks
Change-Id: I4d8c4199cb3c351983cf4d74bc8cd6f5e66d92ed
- errors are now returned as tracebacks, not HTML
- added schema checking based on the handler type and validator
- content_json decorator rewritten completely
- common JSON types
- creation of nodes with non-number ID is now forbidden according to scheme
Implements: blueprint nailgun-api-requests-responses-validation
Change-Id: Icf49bb534ccb19872402b66532ef44418bd66a53
Currently we have turned off validation of HTTP PUT requests for node
handlers. This leads to the situation when we save in database broken
data. Since now it's fixed.
Change-Id: I844e7c48537d32791fc4f952a8b8e7b24bb419e1
Closes-Bug: #1398048