summaryrefslogtreecommitdiff
path: root/contrib/heat_docker/heat_docker
Commit message (Collapse)AuthorAgeFilesLines
* Use unittest.mock instead of third party mockSean McGinnis2020-05-052-2/+2
| | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I8f764e9ba46a4e2055be61eb0fe97d155ab1c70e Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Remove six and python 2.7 full supportHervé Beraud2020-04-222-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Six is in use to help us to keep support for python 2.7. Since the ussuri cycle we decide to remove the python 2.7 support so we can go ahead and also remove six usage from the python code. Review process and help ----------------------- Removing six introduce a lot of changes and an huge amount of modified files To simplify reviews we decided to split changes into several patches to avoid painful reviews and avoid mistakes. To review this patch you can use the six documentation [1] to obtain help and understand choices. Additional informations ----------------------- Changes related to 'six.b(data)' [2] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ six.b [2] encode the given datas in latin-1 in python3 so I did the same things in this patch. Latin-1 is equal to iso-8859-1 [3]. This encoding is the default encoding [4] of certain descriptive HTTP headers. I suggest to keep latin-1 for the moment and to move to another encoding in a follow-up patch if needed to move to most powerful encoding (utf8). HTML4 support utf8 charset and utf8 is the default charset for HTML5 [5]. Note that this commit message is autogenerated and not necesserly contains changes related to 'six.b' [1] https://six.readthedocs.io/ [2] https://six.readthedocs.io/#six.b [3] https://docs.python.org/3/library/codecs.html#standard-encodings [4] https://www.w3schools.com/charsets/ref_html_8859.asp [5] https://www.w3schools.com/html/html_charset.asp Patch 1 of a serie of 28 patches Change-Id: Ia310a58ffdc688302b32d57a6bef6b1b8f5d9950
* Remove mox usage from test_docker_containerricolin2018-04-011-24/+16
| | | | | Change-Id: I331dfd937efad0dafed3aaa29b2d5a3d9741a4a6 goal: mox-removal
* Fix broken test in DockerContainerTestricolin2018-04-011-7/+7
| | | | Change-Id: I5b72684ff913c936943a37310fbea2b9684ef180
* heat_docker: Require docker instead of docker-pyThomas Bechtold2018-01-121-2/+2
| | | | | | | | | | | docker-py was renamed to docker. Use docker with the version mentioned in global-requirements. Also docker.Client was renamed to docker.APIClient (see [1]). [1] https://docker-py.readthedocs.io/en/stable/change-log.html#breaking-changes Change-Id: I041727c1817c55be5265cc77d6ab9b5db5bf5dcf
* Remove log translationsliyi2017-03-251-3/+2
| | | | | | | | | | | | Log messages are no longer being translated. This removes all use of the _LE, _LI, and _LW translation markers to simplify logging and to avoid confusion with new contributions. See: http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html Change-Id: Ieec8028305099422e1b0f8fc84bc90c9ca6c694f
* Unit tests: Don't use ResourceDefinition as cfn snippetZane Bitter2016-05-011-35/+44
| | | | | | | | Eliminate from the unit tests the deprecated use of a ResourceDefinition as if it were a snippet from a CloudFormation template, in preparation for this being removed in future. Change-Id: I0449d3bff19c1294a9d0a475a4a9b623c73e11db
* Merge "remove containers on delete"Jenkins2016-03-023-30/+56
|\
| * remove containers on deleteLars Kellogg-Stedman2015-12-093-30/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch calls client.remove_container after a container has stopped running in response to client.kill. In the event that a container is created with an explict name, as in: docker_dbserver: type: "DockerInc::Docker::Container" properties: image: mysql name: dbserver Failure to remove the container on delete will prevent the stack from being re-deployed. Change-Id: Ic864d1a808b303fcb58815b87e55a0e7d1639bbb closes-bug: #1364019
* | Using LOG.warning replace LOG.warnLiuNanke2015-12-291-1/+2
|/ | | | | | | | *Python 3 deprecated the logger.warn method, see: *https://docs.python.org/3/library/logging.html#logging.warning *so we prefer to use warning to avoid DeprecationWarning. Change-Id: I07ee9c97c3548c965aaf83d34b37b23e9baba584
* Remove default value for mem_limit to keep up with docker-pyJiří Suchomel2015-11-301-2/+1
| | | | | Change-Id: I04d9be374de7bf00cf89cc6e24aa749cb6686a16 Closes-Bug: 1521109
* py34: contrib resourcesSirushti Murugesan2015-09-222-3/+3
| | | | | | partial blueprint heat-python34-support Change-Id: I39b1cf5007a9dae599954054dd9a3ec0472900b6
* Convergence: Store resource status in cache dataRakesh H S2015-09-141-0/+1
| | | | | | | | | | | | | Fix failing convergence gate functional tests - store resource uuid, action, status in cache data. Most of the code requires the resource to have proper status and uuid to work. - initialize rsrc._data to None so that the resource data is fetched from db first time. Change-Id: I7309c7da8fe1ce3e1c7e3d3027dea2e400111015 Co-Authored-By: Anant Patil <anant.patil@hp.com> Partial-Bug: #1492116 Closes-Bug: #1495094
* Move Resource exceptions to common module (3)Oleksii Chuprykov2015-09-042-3/+3
| | | | | | | | | | It is convenient to have all exceptions in exception module. Also it is reduces namespace cluttering of resource module and decreases the number of dependencies in other modules (we do not need to import resource in some cases for now). ResourceInError exception is moved in this patch. Change-Id: I122c032468efeb97d165af4ae372bc35b60a11a2
* Update version for LibertyDoug Hellmann2015-06-221-3/+3
| | | | | | | | | | | | | Update the version for Liberty, switching from date-based versioning to pre-versioning using SemVer. See http://lists.openstack.org/pipermail/openstack-dev/2015-May/065211.html and http://lists.openstack.org/pipermail/openstack-dev/2015-June/067082.html for details. Also new version was updated in resources with SupportStatus version 2015.2. Change-Id: I6a35fa0dda798fad93b804d00a46af80f08d475c
* Add support_status to all resources in contribMiguel Grinberg2015-06-041-0/+4
| | | | | | | | | This change adds support_status to all the resources that are in the contrib area of the repository that don't have it already. These resources are given the UNSUPPORTED status, to indicate that the Heat team is not responsible for maintaining them. Change-Id: I8835bf3f99774c40da1e8d34a474071a71686cd1
* Retain references to stacks in all unit testsZane Bitter2015-05-141-41/+42
| | | | | | | | | This will allow Resources to hold weak references to Stacks (so as to avoid circular references) without causing the Stack object to be prematurely deleted. Change-Id: Ia76da7bc51042fb3598ef2a660d6fbf78137a37b Related-Bug: #1454873
* Docker plugin add cpu set propertyLiangChen2015-04-212-4/+34
| | | | | Change-Id: I96763d0bc293baee044f79d0bc3123adf40c0728 Closes-bug: #1439042
* Docker plugin add host devices propertyLiangChen2015-04-142-3/+144
| | | | | | | | | | | | | | | Docker 1.2.0 and docker-py 0.6.0 support the device parameter when starting containers(docker run --device[]). Using --device you can add a host device to the container without the --privileged flag.(e.g. --device=/dev/sdc:/dev/xvdc:rwm) Note:":" is used to split the full device path. Reference: (parse_devices function) https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L259 Change-Id: I7735a8b769062f442cc8f1810dbdecdc6324509e Closes-bug: #1434427
* Merge "Docker plugin add cpu share property"Jenkins2015-04-132-20/+64
|\
| * Docker plugin add cpu share propertyLiangChen2015-04-132-20/+64
| | | | | | | | | | | | | | | | | | | | | | | | Docker API 1.8 and docker-py 0.3.0 support the cpu-shares parameter when creating containers(docker run --cpu-shares=0). By default, all containers run at the same priority and get the same proportion of CPU cycles, but you can tell the kernel to give more shares of CPU time to one or more containers when you start them via Docker. Change-Id: Ic20cc56070c120ab46379aa42d5da6ac9425cae7 Closes-bug: #1439033
* | Docker plugin add the 'support_status' for the properties ofLiangChen2015-04-101-3/+6
|/ | | | | | | 'RESTART_POLICY','CAP_ADD' and 'CAP_DROP' Change-Id: If52d4f216535f0b9b8efea35d5eef54a5e91cd77 Closes-bug: #1442444
* Docker plugin add read_only propertyLiangChen2015-03-253-2/+88
| | | | | | | | | | | | | Docker 1.5 and docker-py 1.0.0 support the read_only parameter when starting containers(docker run --read-only). By using this capability in combination with volumes, you can make sure containers only persist data where it can be managed in a known location. we should support it in the heat-docker Change-Id: I6fdc3e46bb86b387a187f8fceb22997daed0a9f1 Closes-bug: #1430211
* Docker plugin add restart policies and capability propertiesLiangChen2015-03-172-1/+151
| | | | | | | | Add restart_policy, cap_add and cap_drop properties for stability and security. Closes-bug: #1430197 Change-Id: Iec184fdf5c765217ff7058e8b1390b2f73c59b40
* Make import of oslo libraries namespacelessJens Rosenboom2015-02-181-1/+1
| | | | | | | See https://blueprints.launchpad.net/oslo-incubator/+spec/drop-namespace-packages Closes-Bug: 1423174 Change-Id: I48680ce6e7ce91005c147ab4388203946171d433
* Move logging to use oslo_log librarySteven Hardy2015-02-171-1/+1
| | | | | | | | | | | | The oslo-incubator log modlule has been removed, so port to the oslo_log library. Note this uses the new (non namespaced, e.g oslo.log) import convention, we'll need to align other imports in a future commit. Some import reordering was required due to pedantic H30[57] checks, and the services have all been converted to initialize the oslo_log library as this is done differently to the log.py in incubator. Change-Id: Ib5a97123fe1b287bc531e42d7887c13ba6205628
* Detect container failure when checking create completeRandall Burt2014-11-202-0/+27
| | | | Change-Id: I77f56ec544a82e13cd5a00a3adcfde6c0dda822e
* Fix [H302] errors in contribPeter Razumovsky2014-11-141-6/+9
| | | | Change-Id: I356753e791e574ee45b3b254aaeb80b242e13b23
* Don't import HeatTestCase directlyZhenguo Niu2014-10-221-2/+2
| | | | | | | Fix the HeatTestCase import issue as required by H302, a following patch of https://review.openstack.org/#/c/129846/ Change-Id: Iab9a508682e9fe2932b7d00b191c8a4cdea4738b
* Log translation hint for Heat.contribliu-sheng2014-10-151-1/+2
| | | | | | | | | | | | | | | Currently, Log translation is motivated by oslo's move to prioritized translation of strings, as documented at https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation - add log translation hints for warning, error and info levels - move from LOG.warning to LOG.warn - remove use of % as a string formatter, use the log functionality instead Partial implements blueprint log-translation-hints Change-Id: I8dbb5430507283038939b5665d67615c46b1f72e
* Switch to oslo.utilsJulien Danjou2014-09-301-2/+2
| | | | Change-Id: I74979d8f75b099858314a30c98bb252c379e0304
* Switch heat resources & db & tests to oslo.i18nEthan Lynn2014-09-171-1/+1
| | | | | | | | Use oslo.i18n in resources & db & tests directories. blueprint oslo-i18n Change-Id: Idaf718b9d762b9ae89d6045557eadb758b552bd5
* Merge "Improve docker resource deletion"Jenkins2014-09-042-2/+49
|\
| * Improve docker resource deletionJeff Peeler2014-08-292-2/+49
| | | | | | | | | | | | | | | | handle_delete and check_delete_complete were not handling NotFound exceptions Change-Id: I6e8100ff37157f6a06837307cea31af66a3403af Closes-Bug: #1296758
* | correctly implement volumes_from propertyLars Kellogg-Stedman2014-09-011-10/+12
|/ | | | | | | | | | | | The Docker plugin incorrectly implements the 'volumes_from' option: - The property is marked as a string when it should be a list, and - The property needs to be passed to start_container rather than create_container. Change-Id: I617a4d29a9edbb45d80c7b8abb8f87eeaf795a8b closes-bug: #1364041 closes-bug: #1364039
* Rename docker directory to heat_dockerJeff Peeler2014-08-286-0/+587
This directory was renamed in 4e8231, which made importing docker (that is docker-py) difficult if not impossible in Python 2.x. So rename it to something other than 'docker' to avoid that problem. (setup.cfg has been modified with the new path) Change-Id: I3cbb7c5d4b53f70e1dc6102881f8e05852341a9a Related-bug: #1296758