summaryrefslogtreecommitdiff
path: root/ironic_python_agent
Commit message (Collapse)AuthorAgeFilesLines
* Fix compatibility with Pint 0.5Dmitry Tantsur2017-05-221-1/+1
| | | | | | | | | | This is the version we have in global-requirements, and it does not contain module pint.errors. Fortunately, in all versions the required error is exposed on the top level, so just use it. See https://review.rdoproject.org/r/6741 for a build failure. Change-Id: I1f194ccc48a3195fcbf8599c3a0b4fa21fde16d2
* Merge "NUMA-topology collector"Jenkins2017-05-223-0/+611
|\
| * NUMA-topology collectorJaganathan Palanisamy2017-05-163-0/+611
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the optional collector for fetching the NUMA topology details. Collects RAM, CPU Cores, thread siblings and NICS data for each NUMA node and stored under "numa_topology" key. Closes-bug: #1635253 Co-Authored-By: Jaganathan Palanisamy <jpalanis@redhat.com> Change-Id: I5a546c009d95f39b7af4d89cf785be8acb8ebc67 Signed-off-by: karthik s <ksundara@redhat.com>
* | Merge "Collect NIC name given by BIOS"Jenkins2017-05-223-13/+149
|\ \
| * | Collect NIC name given by BIOSAnnie Lezil2017-05-183-13/+149
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds an extra field ``biosdevname`` to network interface inventory collected by ``default`` inspection collector (which collects the whole inventory returned by hardware manager) of ironic-python-agent. This feature requires biosdevname utility to collect the bios given NIC names. The tooling module for tinyIPA is created for the same purpose. For CoreOS IPA pxe images, biosdevname tooling module is limited, because Docker repository is created and embedded into CoreOS pxe images. The Docker repository uses debian to download the packages. Debian does not have biosdevname package. Adds an export variable TINYIPA_REQUIRE_BIOSDEVNAME. Set this variable to ``true`` in your shell before building tinyIPA. Closes-Bug: #1635351 Change-Id: Ia96af59e2a74868cac59e5a88cfbb3be60d85687
* | Merge "Add missing description for params of 'start_iscsi_target'."Jenkins2017-05-201-0/+3
|\ \
| * | Add missing description for params of 'start_iscsi_target'.ericxiett2017-05-181-0/+3
| |/ | | | | | | | | Change-Id: I3bbd092d0738110ad36f85f1d333273f46648d2b Closes-Bug: #1691303
* | Replace assertRaisesRegexp with assertRaisesRegexLuong Anh Tuan2017-05-191-2/+2
|/ | | | | | | | | This replaces the deprecated (in python 3.2) unittest.TestCase method assertRaisesRegexp() with assertRaisesRegex()[1]. [1]https://review.openstack.org/#/c/466155/ Change-Id: Ife8504dbb58019a30bcc1495a78ab14c757efc98 Related-Bug: 1673768
* Merge "Remove unused function _configdrive_location"Jenkins2017-05-162-16/+0
|\
| * Remove unused function _configdrive_locationvmud2132017-05-112-16/+0
| | | | | | | | | | | | | | This function is never used and can be removed safely. Change-Id: Ied7b4984185ea170d33cb57010de89edeaaaeec5 Closes-Bug: #1690135
* | Merge "Prevent tests' unmocked access to utils.execute()"Jenkins2017-05-1512-47/+113
|\ \ | |/ |/|
| * Prevent tests' unmocked access to utils.execute()Julian Edwards2017-05-1512-47/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new base test class that mocks out utils.execute and forces an exception if it gets called. This has rooted out many tests that were doing this as a side effect of calling other functions, doing things like modprobe and running iscsi on the host's actual machine. The tests are all now appropriately patched in places where this was happening, and the new base class permanently prevents this from accidentally happening again. If you really want to call utils.execute() then you need to re-mock it in your unit test. Change-Id: Idf87d09a9c01a6bfe2767f8becabe65c02983518
* | Set valid inspection_dhcp_wait_timeout value in testsJavier Pena2017-04-251-4/+9
|/ | | | | | | | | | | | | inspection_dhcp_wait_timeout is defined as IntOpt, but its value was set in tests to 0.01. This was ok until oslo.config started enforcing types in [1], after that unit tests fail for test_timeout. Fixing by setting the value to 1, and mocking time-related functions to avoid a longer wait. [1] https://review.openstack.org/328692 Change-Id: I732c4aa3d1760c3159d9672e3fae81f8bd72497c
* Merge "Add missing 'autospec' argument to mock.patch"Jenkins2017-03-2014-250/+286
|\
| * Add missing 'autospec' argument to mock.patchJohn L. Villalovos2017-03-1914-250/+286
| | | | | | | | | | | | | | | | | | Add missing 'autospec' keyword argument to mock.patch and mock.patch.object calls. Use 'autospec=True' except for a few cases where it fails because the mocked function is a @classmethod and it doesn't work. In that case explicity set it to 'autospec=False' Change-Id: I620dce91abaa4440e1803aeefb3e93c0b65d1419
* | flake8: Specify 'ironic_python_agent' as name of appJohn L. Villalovos2017-03-164-5/+5
|/ | | | | | | | Specify 'ironic_python_agent' as the name of the application for the flake8-import-order plugin. That way it knows that imports of ironic_python_agent should come after external libraries. Change-Id: Id39d558a51aeb97d96633afea28676634547d0d7
* Merge "Fix logs encoding in py3"Jenkins2017-03-142-1/+3
|\
| * Fix logs encoding in py3zackchen2017-03-142-1/+3
| | | | | | | | | | | | | | | | | | Make sure that logs are encoded as text (not byte strings) in python3 to allow theirs serialization in JSON. Closes-Bug: #1668533 Change-Id: I3d0d87ca766146457d905f89c26331a415bd54f8
* | Correct failure message output when downloadingGalyna Zholtkevych2017-03-103-7/+24
|/ | | | | | | | | This fixes unreadable output on download image failure. Adding new instance variable to exception `ImageDownloadError` class to avoid redundant logs. Change-Id: I51782abd572588adfc62745eeab9c559eb8346dd Closes-Bug: #1657691
* Use flake8-import-orderJohn L. Villalovos2017-02-165-6/+6
| | | | | | | Use the flake8 plugin flake8-import-order to check import ordering. It can do it automatically and don't need reviewers to check it. Change-Id: I946457e9079ce0b54c7fe0ad554d024a1c61dce0
* Merge "Configure and use SSL-related requests options"Jenkins2017-02-079-2/+90
|\
| * Configure and use SSL-related requests optionsPavlo Shchelokovskyy2017-01-139-2/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds standard SSL options to IPA config and makes use of them when making HTTP requests. For now, a single set of certificates is used when needed. In the future configuration can be expanded to allow per-service certificates. Besides, the 'insecure' option (defaults to False) can be overridden through kernel command line parameter 'ipa-insecure'. This will allow running IPA in CI-like environments with self-signed SSL certificates. Change-Id: I259d9b3caa9ba1dc3d7382f375b8e086a5348d80 Closes-Bug: #1642515
* | Remove switch_port_descr and switch_chassis_descrRamamani Yeleswarapu2017-02-021-6/+1
| | | | | | | | | | | | | | Removes two reserved fields ``switch_port_descr`` and ``switch_chassis_descr`` that were deprecated in the Newton cycle. Change-Id: Icd2251af63a69d60d1e72eddf651a168fdae94fa
* | Merge "Remove compatibility with old bash-based introspection ramdisk"Jenkins2017-01-302-155/+5
|\ \
| * | Remove compatibility with old bash-based introspection ramdiskDmitry Tantsur2017-01-092-155/+5
| | | | | | | | | | | | | | | | | | | | | Inspector is using inventory directly, so we can remove the bits sending processed network and scheduling properties. Change-Id: I6c58bc3c5ea78fd2dbda82b38515f332ce2e8d4a
* | | Add a comment about the catch-all exception for psutilJohn L. Villalovos2017-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | | If there is a problem with psutil failing we have a catch-all exception. Explain reasoning for the catch-all exception. Change-Id: Id2e22e4ff93d96c795f474e72a684dfe3db87a58
* | | Remove support for older psutil versionsJay Faulkner2017-01-262-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Global requirements was recently updated to force psutil=>3.0.1. This patch removes support for older versions of psutil as well as changing to opportunistically attempt to work if a version >5 is released but doesn't change the interface we use. Change-Id: I1f7fab33fd275fb8b5cd7704dc13375402756d06 Related-bug: #1659137
* | | Support psutil 5.0.1Mario Villaplana2017-01-242-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An upper-constraints update to psutil caused IPA to start using psutil 5.0.1. We had a hard-coded assumption that psutil would be major version 1 or 2. This allows us to use the updated psutil and attempts to simply fail gracefully if an unrecognized psutil version is used. Change-Id: Ibe072440159561b34a29b478d955876e5fb7f103 Closes-Bug: 1659137
* | | Merge "Mock out get_wildcard_address"Jenkins2017-01-241-5/+13
|\ \ \
| * | | Mock out get_wildcard_addressDerek Higgins2017-01-201-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In cases where unit tests are running in a env where IPv6 isn't enabled it was returning the IPv4 wildcard address. Change-Id: I0ebadafca70d9cddf761f2ef54726e0123af10f5
* | | | Merge "Reboot and Poweroff fails with coreos IPA image"Jenkins2017-01-202-4/+41
|\ \ \ \ | |/ / / |/| | |
| * | | Reboot and Poweroff fails with coreos IPA imageAnnie Lezil2017-01-202-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CoreOS IPA images do not support poweroff/reboot due to running in a chroot. For this case, we fall back to forcing poweroff or reboot via sysrq commands Change-Id: I75d68b6308beba299d043e43a5fa1671b6ef3ada Closes-Bug: #1628367
* | | | Merge "Limit memory usage when running qemu-img convert"Jenkins2017-01-201-0/+3
|\ \ \ \
| * | | | Limit memory usage when running qemu-img convertLucas Alvares Gomes2017-01-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is limiting the memory address space to 1 GiB when invoking qemu-img convert. The qemu-img command can be exploited so we better play on the safe side (See: bug #1449062). Change-Id: I2088f74b32d1392310c569cfaa7fd368cb737421 Closes-Bug: #1657808
* | | | | Merge "Add IPv6 unit test for _get_route_source"Jenkins2017-01-191-1/+9
|\ \ \ \ \
| * | | | | Add IPv6 unit test for _get_route_sourceDerek Higgins2017-01-191-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up from previous patch Change-Id: Ic0286c4eac57f3ae06b237b700d9dbe95ea8b2c0
* | | | | | Merge "iscsi: Listen for connections on both IPv4 and IPv6 ports"Jenkins2017-01-192-3/+29
|\ \ \ \ \ \ | |/ / / / /
| * | | | | iscsi: Listen for connections on both IPv4 and IPv6 portsDerek Higgins2017-01-192-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow connections if deploying over a IPv6 network. Change-Id: Ib5b97e960fcb30b9a37c5971e88d5251905f8113 Closes-Bug: #1650540
* | | | | | Merge "Agent: Listen for connections on both IPv4 and IPv6 ports"Jenkins2017-01-195-3/+21
|\ \ \ \ \ \ | |/ / / / / | | / / / / | |/ / / / |/| | | |
| * | | | Agent: Listen for connections on both IPv4 and IPv6 portsDerek Higgins2017-01-195-3/+21
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Allow connections if deploying over a IPv6 network. Change-Id: Ied2f6be4aa4d1a70524df1df3506e596f6926e5b Closes-Bug: #1650539
* | | | Merge "Use sh instead of bash when installing grub"Jenkins2017-01-182-11/+11
|\ \ \ \
| * | | | Use sh instead of bash when installing grubPavlo Shchelokovskyy2017-01-172-11/+11
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is no guarantee that 'bash' is present in a user's image, while 'sh' as system shell must be there. As we do not use any bash-specific syntax (just starting commands in a subshell) when installing the bootloader from chroot-ed user image, let's be more supportive and use 'sh' instead of 'bash' for that. Change-Id: I1fb82068b9c55da35166d8d2ecf9f0ba41356adb Closes-Bug: #1657096
* | | | Removes unnecessary utf-8 encodingCao Xuan Hoang2017-01-164-8/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following files added utf-8 encoding but never used. So we can removes them at all. ironic_python_agent/extensions/image.py ironic_python_agent/extensions/iscsi.py ironic_python_agent/tests/unit/extensions/test_image.py ironic_python_agent/tests/unit/extensions/test_iscsi.py Change-Id: Ifc98faf025ee81f885ea58d9203037c6357ea7f2
* | | Advertise the correct address when using IPv6Derek Higgins2017-01-116-2/+79
| |/ |/| | | | | | | | | | | | | | | Parse the output of "ip route get $IP" taking IPv6 into consideration. Also wrap the IP address in square brackets if it is IPv6. Change-Id: Ifc44e5aa3c5b814b6ceba04461bb68fe1d75c22b Closes-Bug: #1650533
* | Merge "Use oslo_serialization.base64 to follow OpenStack Python3"Jenkins2017-01-022-4/+4
|\ \
| * | Use oslo_serialization.base64 to follow OpenStack Python3Luong Anh Tuan2016-12-162-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces python standard base64 library call to oslo_serialization.base64 to follow OpenStack Python3 porting standard [1]. Use base64 encoding takes 8-bit binary byte data and encodes it. On Python3, A string is a sequence of Unicode characters thus base64 has no idea what to do with Unicode data, it's not 8-bit[2]. We use oslo_serialization.base64 for both python2 and python3. [1] https://wiki.openstack.org/wiki/Python3 [2] http://stackoverflow.com/questions/8908287/base64-encoding-in-python-3 Change-Id: I1dafe878a71f37d223eaf58ea8e2e8c6b4422a14
* | | Fail IPA startup if no protocol prefix in ironic api addressJoanna Taryma2016-12-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add regex validation of api_url specified in configuration file. Oslo config will raise exception if no supported protocol prefix is included in Ironic api address in configuration file. Supported protocols are http and https. Closes-Bug: #1630785 Change-Id: I437b4ea0a2995921ddede03bc670087fdbbc8b83
* | | Merge "Add a new Hardware Manager for CNA network card"Jenkins2016-12-195-8/+331
|\ \ \ | |_|/ |/| |
| * | Add a new Hardware Manager for CNA network cardSzymon Borkowski2016-12-125-8/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new hardware manager, which will disable the embedded LLDP agent on Intel CNA network cards in order to allow the gathering of LLDP data during the inspection process. Change-Id: I572756ac6a7bf67a7f446738ba9d145e1c1bdc48 Closes-Bug: #1623659
* | | Merge "Use oslo-config-generator for sample config"Jenkins2016-12-161-24/+65
|\ \ \ | |_|/ |/| |