Commit Graph

68 Commits

Author SHA1 Message Date
OpenDev Sysadmins 2dff5e35f0 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:37 +00:00
Fellype Cavalcante 000809f779 Remove old validations of memory_mb before manage state
This patch serves to correct the problem presented in UFCG OneView CI,
in which the node was being created and changed the state to manageable,
and only validate the memory_mb after that.

Change-Id: Id0ef20b320a622da6990f6ffaf26256059582743
2017-08-22 15:09:28 -03:00
Fellype Cavalcante 69c43a41b8 Adds none port checking on validations
This patch serves to correct the problem presented in UFCG OneView CI,
in which the node was being created and changed the state to manageable,
and only creating the port after that.
This breaking one of its validations and with this new verification,
this problem can be solved.

Change-Id: I5be89d54c886b24553a6c7f9d836e9ba28211b9b
2017-08-15 15:11:03 -03:00
OpenStack Proposal Bot 40c2418eb8 Updated from global requirements
Change-Id: Ic299f1f52fbcaba3821cae404f17591e874fdd61
2017-05-22 22:50:27 +00:00
Hugo Nicodemos a2f112909a Get the first physical ethernet port in Server Hardware
Before, the python-oneviewclient was getting the mac for
the first device and physical port in the Server Hardware.
This patch ensures that the mac its from a physical ethernet
port and port function 'a'.

Change-Id: Ia45053cd9d30cd0496c2b497dc71edd067976e72
2017-05-22 13:34:08 -03:00
Stenio Araujo 7fcda18be0 Remove self from method calling
Remove self from the method calling when using
_is_node_port_mac_compatible_with_server_hardware and
_validate_server_profile_template_mac_type

Change-Id: I60467a61c28c9ccab35c83f16659d8697023fb39
Co-Authored-By: Saulo-Aislan <sauloa@lsd.ufcg.edu.br>
2017-04-18 18:07:19 -03:00
Stenio Araujo ac3e21bb66 Reenable the dynamic allocation validation methods
This patch reenable the methods used when dynamic allocation
is enabled.

Change-Id: I47606a2fd0c27b82217ec5491a997e226a8469f6
2017-04-04 11:51:31 -03:00
Jenkins 2afbca7a91 Merge "Add validation for connections" 2017-03-30 17:42:46 +00:00
Hugo Nicodemos 9c448a1b16 Update the python version in tox.ini
The OpenStack doesnt check tests with python34
anymore, this patch bumps oneviewclient python
version to python35 when running tests with tox.

Change-Id: I5fd374e72335832a504955d50ed31df45068ffe9
2017-03-30 14:12:53 -03:00
Andre abd32cbdfe Add validation for connections
This patch its about to add all connections validation
for flat and neutron network interface and if the user
its using the OneView ml2 Driver.

Change-Id: I6c47f6b09d22b530da8eeac189ff54f603850723
2017-03-30 14:11:40 -03:00
root 2605032944 Add parameter to get Server Hardware MAC address from iLO
This patch adds the allow insecure connection parameter
in the method get_sh_mac_from_ilo.

Change-Id: I69485d85d32bfafd93c3f955c41cac3fb078a920
2017-02-09 13:08:08 -03:00
Hugo Nicodemos 787b72794a Refactor the validation to Server Profile Template
This patch adds a new validation to OneView Server Profile
Template to ensure OneView drivers can manage the boot order of
the Server Profile and validates the connections to have at least
one primary boot priority.

Change-Id: Ie65731a38061171627e7a0786efc083a5518085a
2016-10-17 11:13:48 +00:00
Jenkins 566b53c828 Merge "Adds attribute mac_type to a SPT and a validation" 2016-10-14 22:37:05 +00:00
Jenkins 0307b08537 Merge "Remove cpus validation due inconsistency with inspection cpus count" 2016-10-13 22:16:51 +00:00
Stenio Araujo e5a0b9b423 Adds attribute mac_type to a SPT and a validation
This commit inteds to add the attribute macType to the Server Profile
Template (SPT) model and to create the method
validate_server_profile_template_mac_type within the class
oneview_client.client.Client to verify if the SPT has a physical MAC.
This will be used at the Ironic's driver to ensure that the SPT has a
physical MAC when dynamic allocation is being used.

Change-Id: I21a1ebfc14ec33c661a1e7c7c1dbdcdcab04f119
Partial-Bug: 1627818
Co-Authored-By: Charlle Daniel <charlledaniel@lsd.ufcg.edu.br>
2016-09-29 16:32:45 -03:00
OpenStack Proposal Bot 626bf7cb7f Updated from global requirements
Change-Id: I047af0072d442fa80258fa24e4914ff990d01fd7
2016-09-28 17:00:50 +00:00
Xavier 9c217f936b Remove cpus validation due inconsistency with inspection cpus count
This patch removes the validation for cpus due inconsistency of the
value returned by the inspection process when processor supports
hyper-threading technology.

Change-Id: I0e389e9e8699749dd8a2267891c6649222e6e2e8
2016-09-22 17:14:05 -03:00
Hugo Nicodemos 971f3e799f Add URL of the resource in exception message
When the OneView resource is not found in the driver validation,
the exception message just says "resource not found in oneview".
This patch adds the URL of the resource not found to the OneView
exception message.

Change-Id: Iaab4d50d42a361719f11a968b2423456eb1ad728
2016-09-20 10:56:00 +00:00
Xavier 0cee89e7b8 Ensure values under validation have same data type
This patch address the case of validating resources like memory_mb
and cpus that have same values but doesn't have same type, for
example, in case of node's memory_mb and cpus registered as unicode
after an inspection process. In this patch we convert the data into
to string, making possible the values pass in the validation when
correct.

Change-Id: I014ace14cb315444643c7e2c8d5b43b01cc7ef86
2016-09-13 18:36:41 -03:00
Jenkins ba915b2ee0 Merge "Remove discover from test-requirements" 2016-09-07 21:25:19 +00:00
Xavier b79ce29232 Add auditing instrumentation for python-oneviewclient
This change is about adding the ability of python-oneviewclient to
register time, parameters values and return values for methods
calls that do requests to OneView appliance. The instrumentation
implemented by this patch provides the necessary support that will
be needed to measure the performance of the OneView driver for
ironic and other tools.

Change-Id: Iae7fe8ec559ccb2cbf8f93486eb4a1a674d7053a
Co-Authored-By: Hugo Nicodemos <nicodemos@lsd.ufcg.edu.br>
2016-09-07 20:58:10 +00:00
Thiago Paiva a67c6c96c9 Re-authenticating on session invalidation
To set the ground for singleton oneview_client and re-use the session token,
first, it needs to re-authenticate when the session token becomes invalid. This
will ensure that a singleton instance of oneview_client won't break the service
when the object is alive further than the token expiration time.

Change-Id: Ia01435faf5f4bf84d896dc20ad07eed75280df3e
2016-08-18 18:59:52 -03:00
Jenkins 87f974a371 Merge "Comply with iLO model of usage for one-time boot" 2016-08-10 01:12:55 +00:00
Jenkins aab910a9f0 Merge "Workaround to OneView pagination" 2016-08-10 00:37:39 +00:00
Thiago Paiva 53808945f6 Comply with iLO model of usage for one-time boot
After a review from Shivanand and a talk in the #openstack-ironic channel, the
understanding is that we should use the BootSourceOverrideEnabled=Once to comply
with iLO's model to use that REST endpoint.

http://eavesdrop.openstack.org/irclogs/%23openstack-ironic/%23openstack-ironic.2016-08-02.log.html#t2016-08-02T14:09:58

Change-Id: Ic650defd699f9330d54c2345fcaa0797a3e79e55
2016-08-09 17:27:43 -03:00
Jenkins c52a05ad81 Merge "Passing SUPPORTED_ONEVIEW_VERSION as string + transient error fix" 2016-08-09 19:06:53 +00:00
Thiago Paiva 0fb4f99122 Passing SUPPORTED_ONEVIEW_VERSION as string + transient error fix
requests==2.11.0 is now checking header parameters for string or buffer types.
We were passing SUPPORTED_ONEVIEW_VERSION as int, but now it's not allowed.
This patch str's SUPPORTED_ONEVIEW_VERSION before passing it to requests.

This patch also fixes a transient error occuring due to simultaneous access to
constants in 'fixtures.py'.

Change-Id: I188914c0f1c6a1c8496da59857e99ff03a2b83e6
2016-08-09 11:22:26 -03:00
Jenkins 57f2e99cce Merge "Raise Not Authorized Exception when connection request is forbidden" 2016-08-09 04:58:56 +00:00
Hugo Nicodemos fe213ff553 Workaround to OneView pagination
Since the OneView API for get a list of resources using count=-1 doesn't
work properly, this patch set a high value to workaround that case.

Change-Id: I5867556578072442c8fdafa5bcdd4338d38840a1
2016-08-08 19:00:15 +00:00
Lokesh S 8c976721ca Raise Not Authorized Exception when connection request is forbidden
Currently it logs IncompatibleOneViewAPIVersion which confuses
users to assume it is version issue. It can be wrong request
call.

Change-Id: I0bd69a9173d7318bb9e06a38ba54c043f9198b30
Closes-Bug: 1603928
2016-07-28 17:46:01 -03:00
Thiago Paiva dca44ab0dd Optimizations for setting boot device
By default, OneView doesn't provide on its API a facility to set one-time boot
on managed ServerHardware. This patch aims to allow it through bypassing OneView
and using iLO's REST interface directly. Also, some optimization is made to not
try to set again the boot device if the selected one is already the primary.

Change-Id: I1163048b6edf8778c3a84414804b73eef2c0fd5f
2016-07-22 17:06:19 -03:00
Swapnil Kulkarni (coolsvap) afe7570e6b Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: I8ffb9c04c6021749abd8c29296c6b908f23aa879
2016-07-22 04:08:50 +00:00
OpenStack Proposal Bot 2100accffd Updated from global requirements
Change-Id: I2b267abbc2288d399b1d1f6dd2d8aa676ea03570
2016-06-22 19:21:32 +00:00
Jenkins 1cca66848f Merge "Added functions to translate between uuid and uri" 2016-06-22 16:35:58 +00:00
Thiago Paiva 07caa4279c Validation failing with 2 connections
The `validate_spt_boot_connections` were throwing exception when encoutered a
NotBootable connection even when the Primary is present. This patch solves that
and adds tests to ensure the behavior expected from this validation.

Change-Id: Ic00205bfc69818e68c61aab207a6900a55b493be
2016-06-15 20:34:38 -03:00
Jenkins 0455e167d6 Merge "Remove insecure connection warnings" 2016-06-09 13:51:49 +00:00
afaranha 6954368c94 Added functions to translate between uuid and uri
This change is a subset of patch 294559 to help the reviews and
decouple code.
Added _is_uuid_valid to check is a uuid is valid.
Added get_uri_from_uuid to translate a given resource UUID to a
resource URI.

Change-Id: Ida83b476e722f0e3c6f987cd5b893f8a8127c3b4
2016-06-07 20:21:52 +00:00
Sinval Vieira 3d4bf19585 Adding dynamic allocation operations
This patch adds server profile application and removal operations.
Relates to the dynamic allocation series of patches.

Co-Authored-By: Lilia Sampaio <liliars@lsd.ufcg.edu.br>
Co-Authored-By: Xavier <marcusrafael@lsd.ufcg.edu.br>
Co-Authored-By: Caio Oliveira <caiobo@lsd.ufcg.edu.br>
Co-Authored-By: Hugo Nicodemos <nicodemos@lsd.ufcg.edu.br>

Change-Id: I4aed1109226fd998c48913a022f39c7fe293f489
2016-06-07 11:10:35 -03:00
hugonicodemos e8e1d7fec5 Remove insecure connection warnings
This change turns the Python Requests library warning messages hidden
when connecting to oneview without HTTPS, with the option
allow_insecure_connection as True.

Change-Id: I1c5790d93fd490114211a7245f84793d027c045a
2016-06-03 03:48:03 +00:00
Jenkins ae3414cd5b Merge "Bugfix+removing invalid tests+functional at gate" 2016-06-01 20:57:25 +00:00
Thiago Paiva b49a1fe73a Bugfix+removing invalid tests+functional at gate
A bug has been introduced on the code along with ClientV2.
`get_server_profile_template` was calling the manager of server_profile instead
of server_profile_template. This wasn't seen because functional tests for
Client(v1) were wrong and useless. Tests fixed for the case above and I changed
.testr.conf to run funcional tests on py34 and py27 gates since they're mocked
at the limits of the system anyway.

Change-Id: Iea97095dbf34267a053dafbee0ebcd56ec55db13
2016-06-01 20:14:44 +00:00
OpenStack Proposal Bot ddb96da893 Updated from global requirements
Change-Id: If277e5171ac2e098113d431796124b3eeb2c3045
2016-06-01 14:17:09 +00:00
Thiago Paiva 814be3229b Updating requirements by hand
In recent run of devstack, I found that python-oneviewclient was installing a
version of pbr that wasn't the most up to date version used by openstack
services. In consequence of that, services restarted after the build of devstack
were failing. To solve that, a couple of commits were proposed on
openstack-infra/project-config and openstack/requirements so as the "Openstack
Proposal Bot" proposes changes in python-oneviewclient when the
global-requirements changes. But until the patches are approved,
I'm proposing this patch on emergency basis to update the requirements file and
keep the integration Ironic/OneView working.

Change-Id: I2a034117ad902774a613bc3c8088ac72413242e9
2016-05-30 13:39:18 -03:00
Thiago Paiva c8dd37d0a7 Fixing __getattribute__ def and refactor from_json
The previous commit left a __getattribute__ definition in models.OneViewObject
that would enter an infinite loop when called with an argument that isn't on the
attribute_map of the instance. I'm removing it since it was legacy of a test and
shoudn't have remained on the code. This also refactors duplicate code on
*_from_json methods.

Change-Id: Ib080d58d666e39865cc7c03121d0341361c9617c
2016-05-26 12:30:15 +00:00
Thiago Paiva caa0e7a657 OneView client with managers
This patch implements object managers for OneView objects and uses it for the
new ClientV2 class. This will make the UX of python-oneview client much simpler
than having a ton of specific methods directly on the Client object.

Change-Id: I7502212fa340e3a142b5aaa5b590dd4d4254e022
2016-05-24 21:33:14 +00:00
Afaranha 85577a1b03 Refactor of unit Tests
Refactoring unit tests to instantiate oneview_client only once and
reusing it on the tests.

Change-Id: I0ef1fa0328266e5f327280287b0c17395efe8166
2016-04-05 20:18:02 +00:00
Thiago Paiva e46157abe7 Facility to get mac address from iLO on DL class
OneView doesn't introspect connections for the DL class servers. This commit
adds facilities to get a token for the iLO REST API through OneView and get
the iLO address of a given interface (by index) from it.

Change-Id: I3912a2562928ca798deca99b96380d961bb8da81
2016-03-02 17:27:08 -03:00
Thiago Paiva e5fd3873b6 Classifying tests into functional and unit
As defined on the planning of sprint 2016-2, we'll maintain unit and functional
tests in separate directories and have a tox environment to run functional
tests. This patch re-configures the environment of tox and re-arrange the
testing modules.

Change-Id: I8ad43e73fb627c2881e50bef426e34eb989b3858
2016-03-02 11:45:58 -03:00
Caio Oliveira f4816b6837 Fixing URL of index variable and refactoring
This patch fixes the problem related to the URL of the server
 profile template, that was not the same as used in REST API of
 OneView. Also, some refactoring in the client.py module,
 methods *by_uuid, that could be simplified.

Change-Id: I943d1444c9a0315ff1061f20432d7255df75e468
Closes-Bug: #1549994
2016-02-26 16:18:00 +00:00
Jenkins 174e9390e4 Merge "Getting OneView resources by their uuid" 2016-02-11 18:37:28 +00:00