41 Commits

Author SHA1 Message Date
Andrey Pavlov
f9e75281b4 fix UT for cinderclient
- bump version from 2 to 3 for cinderclient
- update aws ec2 interface for create_colume and
  create_network_interface. add cilent_token param
- fix describe network interface - something was
  changed in neutron ports output
- set metadata port for OVN conf file also

Change-Id: Ie3e5a5930d5a8159050ecc0900239935558dddd7
2021-09-28 19:24:15 +00:00
chenghuiyu
c65cb663de Fix usage of isotime
The commit I34b12b96de3ea21beaf935ed8a9f6bae2fe0d0bc and
Ib384ae8130dcc6cbd47a837d11ca171ce02ef29e introduced the
deprecated oslo_utils.timeutils.isotime() is deprecated
as of 1.6.

The deprecation message says to use the datetime.datetime.isoformat()
instead, but the format of the string generated by isoformat isn't
the same as the format of the string generated by isotime. The string
is used in tokens and other public APIs and we can't change it
without potentially breaking clients.

So the workaround is to copy the current implementation from
oslo_utils.timeutils.isotime() to ec2api.api.ec2utils.

For more informations:
https://docs.openstack.org/oslo.utils/latest/reference/timeutils.html

Change-Id: Id62fb53264b04a7ea6ae3035a129353c5cfa040a
Closes-Bug: #1461251
2018-06-29 16:00:40 +03:00
Ronald Bradford
f70ab5b46d Graduate to oslo.utils.timeutils
Remove the Oslo Incubator code for timeutils in favor for the
 oslo.utils functionality.

Change-Id: Idb7917b80add6aa0f492e6974b630c3a8ffce71f
Depends-On: Ieff34b88d857727e02a3918908b2719535ff4b55
2016-03-18 14:11:42 -04:00
Zhihai Song
ed23159ebc Replace oslo_utils.timeutils.isotime
This change introduces ec2api.openstack.common.timeutils that
substitutes the deprecating functions from oslo_utils. Using the
isoformat in the datetime lib will change the time format in API.
So it is better to carry this function in ec2-api. The deprecation
happens in this commit.
https://review.openstack.org/#/c/252898/

Change-Id: Id3606e7ca73ab3e7d58cfe6131984dbf0f3b7e4d
2015-12-17 19:02:59 +08:00
Andrey Pavlov
da6f97f291 rework certs stuff
remove ca_certs using for incoming requests
do small refactoring for keystone client using

Change-Id: I83dbb71248835cfc361eca691647deaa99023c8a
2015-11-12 11:19:06 +03:00
Andrey Pavlov
8d1a61ce6c change error code and message due to Amazon changes
Amazon changed error code some time ago.

Change-Id: Ib5eb94f3a5bbdb27bc4ead5898376f274dd6e5c3
2015-10-15 15:34:59 +03:00
Andrey Pavlov
7a04b3a5ac py34: fix comparision NoneType and int
error was:
TypeError: unorderable types: NoneType() > int()

Change-Id: I418204ee0da15d78074bbdbe3e4e7e0fe9e933a1
2015-09-10 20:14:06 +03:00
Andrey Pavlov
6dd3cdbfcc implement describing other network interface attributes
Change-Id: Ib1bc75d2fbbad113c5a9c4d390358cdf8e7d7f97
2015-05-14 17:23:42 +03:00
Andrey Pavlov
64fc208ecf restrict listing neutrons' resources to one tenant for admin
Change-Id: I587f208f9166b3b560331129d81c2a192891c3be
2015-04-14 16:47:23 +03:00
Andrey Pavlov
1cdaf9fe00 add absent filters
Change-Id: I3e5de1b5bd3a0fe238d78c32b627609e1ef886ae
2015-04-02 12:27:45 +03:00
Alexandre Levine
46edb3ccd1 Added filtering for instance-state-* and the mechanism
Removed TODOs for now working filters.

Change-Id: Ic6e7475fe9a55d0457109abcb5883312f1595c1b
2015-03-27 18:53:37 +04:00
Andrey Pavlov
2801f9e687 fix delete on termination behaviour for network interfaces
and add test cases for delete_on_termination preperty for NetworkInterface

Depends-On: I3d557dd95f442106c495249a5ef1d2ac36e6a2ea
Change-Id: Icf2b9739aaf87b4c9af13ad64a310081a68f776e
2015-03-20 11:33:24 +03:00
Feodor Tersin
9e6e4f6542 Simplify usage of db_api.get_items_by_ids
Change-Id: I4053cfb5f1198dfee316e907ac64b9844199d83b
2015-03-01 00:46:25 +03:00
Jenkins
d546e73253 Merge "Simplify usage of db_api.get_item_by_id" 2015-02-27 10:00:31 +00:00
Jenkins
dc68a1b35e Merge "Simplify usage of ec2utils.get_db_item" 2015-02-26 23:17:44 +00:00
Feodor Tersin
dcaf655611 Simplify usage of db_api.get_item_by_id
Change-Id: I7f839a2f845dfef707b9e6939b02e97e50f67927
2015-02-26 22:33:47 +03:00
Andrey Pavlov
67eae1069d follow oslo
move to oslo.db and some other oslo libraries

Change-Id: I57e4f01bd46339cdfe3ed2e4748eb1e923cea584
2015-02-26 22:04:09 +03:00
Feodor Tersin
2de2b74152 Simplify usage of ec2utils.get_db_item
At the moment we cann't completely get rid of validation of a kind of
an object ID, because common parameter validator doesn't validate
complex parameters. So this validation is still used in several cases.

Change-Id: Ibbe73a74306f2359f6554fcc8ef7bc31d356c167
2015-02-26 18:49:00 +03:00
Feodor Tersin
49c721f8c7 Use timeutils from oslo.utils instead of oslo incubator
Change-Id: I4ad485df22bb3779f855b17b74c012f380f12d8e
2015-02-26 13:38:39 +03:00
Feodor Tersin
b200178189 Handle OS and some input errors for network interfaces
Change-Id: Ifc169ecd4babe343f6f2469668975ec59e8dc997
2015-02-14 16:31:41 +03:00
Feodor Tersin
4a524f3116 Remove functional TODOes and fix code style
Change-Id: I93f87cd4caffa31c2203b7936f7b0e1fdf9644cc
2015-02-13 16:50:55 +03:00
Andrey Pavlov
b51104258e Add more tests
Change-Id: I4427eb78b9c6b73a0a492cb246e9ecd532dc58d6
2015-02-10 16:24:43 +03:00
alevine
c116351a17 Adapted default security group to work for Kilo.
Kilo forbids additional security groups to be created with the
name Default. Now we use vpc ID for names of VPC default security
groups in OpenStack but they are converted into EC2 compatible
"default" when reported back to EC2 API client.

Change-Id: I9b1cc8551f3e6d55fab9132934f59bb1bd16a006
2015-02-09 17:18:29 +04:00
Feodor Tersin
5993031efc Delayed delete DB items for instances, volumes
Change-Id: I39c20eff1161c2660f73734f0d11290336546297
2015-02-04 19:18:51 +04:00
Feodor Tersin
3c3c4aacc9 Implement device index for networ interfaces
Change-Id: If4b3de991bb959e0f4f336f55fee53e4468e2d0e
2015-01-26 16:57:18 +04:00
Feodor Tersin
dbfb5b967a Implement tests on OnCrashCleaner
Change-Id: If4e3fa2a164d7643863fa9cade75529671d76156
2015-01-22 10:42:16 +04:00
alevine
7f26413767 Added validation for VPCController
Change-Id: I664e6628f1f89425356c7505a41b6feb9e6bf71c
2015-01-21 20:02:48 +04:00
Andrey Pavlov
4e508a1841 remove access to nova's instance id mapping table
Change-Id: I04475a22067d6892632e0e3b608b4bd1e789ab12
2014-12-30 08:53:50 +03:00
Feodor Tersin
b74f6526f9 Fix describe behavior of selected kinds
Change-Id: I4ec77c7fd1e84e7056887013f334df708755c66c
2014-12-25 18:16:44 +04:00
Feodor Tersin
6ec5a60023 Add tags to describe output
Change-Id: I620e3d497123513c35ebfaed94de93aed82758b8
2014-12-23 18:17:15 +04:00
Feodor Tersin
807d36b64a Refactor describe methods to use Describer class
Except instances due their complexity

Change-Id: Ief2021fb041907a83a43765165fba29574ad2bd7
2014-12-22 15:11:10 +04:00
alevine
9b03a6bc4f Added AvailabilityZones and Regions. Added universal describe.
Change-Id: I82f1fe0a8e1fbd23d9b1d2fcc27523ad1a88e8af
2014-12-07 03:45:48 +04:00
Feodor Tersin
3c400fb115 Filters in describe instances
Change-Id: If5f2e7c37f49df07bfa973dba3ac87a087477a89
2014-11-27 19:43:26 +04:00
Feodor Tersin
bd25a18a1a Update copyright
Change-Id: I185fa28474fca0cc8666d6f59de251ce1f9683f2
2014-11-11 21:02:39 +04:00
Feodor Tersin
b094afcc06 Store identifiers in DB in EC2 form instead of numeric form
Change-Id: I52587fa9e1a2f9cd31349b070dfef0ea6cce33dd
2014-10-17 19:16:55 +04:00
alevine
f9bcef4017 Implemented reset_network_interface_attribute
Change-Id: I89856d4502cd5e4c6ca974fec917872a51e5ce93
2014-10-03 19:56:38 +04:00
alevine
dd68a50ce8 Added source_dest_check functionality
Change-Id: Ife950110084200f5f6e2fcef23ad58d4247b592e
2014-10-02 15:51:51 +04:00
alevine
8b749de708 Added AssignUnassignPrivateIpTest. Fixed some other tests.
Changed called_once_with to assert_called_once_with

Change-Id: I1a732b25542aaaf7e6061dbfc12275b9a672b6ae
2014-09-05 20:22:02 +04:00
alevine
b9dd69bdf1 Assign-unassign IP addresses functionality added. Filtering added.
Fixed a number of bugs to comply with Tempest.

Change-Id: Id43326880e5b2058db4aa09aad4fae048e08620b
2014-09-04 17:57:28 +04:00
alevine
d30f5782d0 Added filters. Fixed some bugs to comply with Tempest tests.
Had to rework matchers to correctly do deep comparison of
lists and dicts.

Change-Id: I9ba05061aeb97c0029e1ddfa008ee47d1b51c7fe
2014-08-26 19:01:20 +04:00
alevine
1a7a3266ea Adding network interfaces and security groups.
Unit tests for security groups are coming up later.

Change-Id: Ifaa3cb56644f85489c82a843f016db91a6ba7c2e
2014-08-08 17:35:06 +04:00