Commit Graph

31 Commits

Author SHA1 Message Date
scrungus 33ab4e9cb4 Update barbicanclient
The changes in version 5.5 barbicanclient cause breaking changes.
Changing which barbicanclient is used fixes this issue.

Story: 2010629
Task: 47581
Change-Id: I1b6b0a4c1960fb5cb6ce04ea755074944fe4bb6f
2023-03-14 02:09:51 +00:00
Takashi Kajinami 67acf2c5e9 Use Block Storage API v3 instead of API v2
Block Storage API v2 was deprecated during Pike cycle and is being
removed during Xena cycle, and current v3 API should be used instead.

Additional Zuul config for Devstack allows CI to pass which can be
reverted later [1].

[1] https://bugs.launchpad.net/glance/+bug/1938151

Change-Id: Ib66b754f4a0854a0d62d62047a69b04a24434634
2021-07-27 20:41:52 +00:00
Mohammed Naser cfe2753fd3 [fedora atomic k8s] Add boot from volume support
Support boot from volume for Kubernetes all nodes (master and worker)
so that user can create a big size root volume, which could be more
flexible than using docker_volume_size. And user can specify the
volume type so that user can leverage high performance storage, e.g.
NVMe etc.

And a new label etcd_volme_type is added as well so that user can
set volume type for etcd volume.

If the boot_volume_type or etcd_volume_type are not passed by labels,
Magnum will try to read them from config option
default_boot_volume_type and default_etcd_volume_type. A random
volume type from Cinder will be used if those options are not set.

Task: 30374
Story: 2005386

Co-Authorized-By: Feilong Wang<flwang@catalyst.net.nz>

Change-Id: I39dd456bfa285bf06dd948d11c86867fc03d5afb
2019-09-20 05:00:29 +00:00
Jim Bach 9a6698fb45 Add Octavia python client for Magnum
Adding the client enables the manipulation of Octavia
resources with Magnum such as during cluster deletion,
being able to clean up non-heat created resouces.

Change-Id: I976ab136e24b98d447d61028ce07d0f5dd9d255a
story: 2004259
task: 27795
2018-11-05 11:45:41 -08:00
Ricardo Rocha 54cd3caf10 Use barbicanclient.v1 instead of barbicanclient
Direct import of barbicanclient is being deprecated, we should use
barbicanclient.v1 as per the warning message.

Closes-Bug: #1737145

Change-Id: I59d9ecfefd6a432cb8004da0d3676c576e53c5f0
2018-01-11 14:48:31 +00:00
yuanpeng 71d25456d2 Remove log translations
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: If1f4bd2f6be967368f52fb367c5a428d3eb58a9d
Closes-Bug:#1674551
2017-03-30 17:05:10 +08:00
yatin 203ce78b7a Fix compatibility with novaclient 7.0.0
Recent update of upper-constraints for novaclient 7.0.0 in [1]
breaked magnum.
This patch makes magnum code compatible with latest release.

Also, passed endpoint_override while class Initialization to
remove warning [2]:-

[1] https://review.openstack.org/#/c/414170/

[2] Property `management_url` is deprecated for SessionClient.
It should be set via `endpoint_override` variable while class
initialization.

Change-Id: Idc0e501c23b77ed5b4e9e9e7a6a7b6af7c7bca75
Closes-Bug: #1658058
Closes-Bug: #1658005
2017-01-20 20:06:54 +05:30
Hieu LE 44cca296f9 Centralize config option: all clients section
Centralize config option of Barbican, Heat, Cinder, Nova,
Neutron, Magnum, Glance client section.
Replace oslo_conf cfg to magnum.conf and fix bug generate
full sample config options of above clients.

Change-Id: I8279e6bd5d397e98953a72e83b379dfc7c6228a3
Implements: blueprint centralize-config-magnum
Closes-Bug: #1613962
2016-09-22 00:59:44 +00:00
Abhishek Chanda 8a5acbde94 Pass some common cert related arguments to clients
These are used to configure clients when they talk to individual
services

DocImpact

Change-Id: Iba6c6a40fa39da35c239ce2bae850225619ca485
2016-06-27 17:48:16 +00:00
Hongbin Lu 96c0286d50 Fix an EndpointNotFound error
Make it backward-compatible with old service type, while printing a
warning message.

Change-Id: I8e65e3cd4ebf732fa014c8d492280213ed052ff2
Closes-Bug: #1586575
2016-05-27 22:16:28 -05:00
Hongbin Lu 754233c51d Update Magnum service name and description
After this patch [1], Magnum is no longer the "Container Service", it
became the "Container Infrastructure Management Service". This commit
updates the service name and description accordingly:
* Change service name from "container" to "container-infra"
* Update service description to reflect its mission

[1] https://review.openstack.org/#/c/311476/

Depends-On: I55205ff2b304678d2b53bbd4d66403078c6baac8
Closes-Bug: #1584251
Change-Id: I5c271bf3fc4d6ccecaf2918aca28ce946bcc6b22
2016-05-23 15:59:16 -05:00
Paulo Ewerton 7f145e703c Refactor Keystone client with keystoneauth
This patch does, basically, three things:

* Updates the default auth section to keystone_auth;
* Introduces keystoneauth sessions and plugins;
* Adds a deprecation warning and options when loading
legacy auth.

Config, tests and client code are also updated.

Co-Authored-By: Henrique Truta <henrique@lsd.ufcg.edu.br>
Co-Authored-By: Raildo Mascena <raildo@lsd.ufcg.edu.br>

Closes-Bug: 1496810
Closes-Bug: 1515014
Change-Id: I5c1cd24ca28d66ae7ae40e7f707b81870cf0e457
2016-03-23 16:24:53 +00:00
wangqun 42d094b757 Get region_name that volume_driver rexray region_name needs
Config volume_driver rexray need region_name

The patch gets region_name, validates the region_name and add
Unit test.
Co-Authored By: Kai Qiang Wu(Kennan)<wkqwu@cn.ibm.com>
Co-Authored By: Ton Ngo<ton@us.ibm.com>
Partially-Implements: blueprint magnum-integrate-with-cinder
Change-Id: I3fcef0ffb7cda162fffcbedf4628cad81168d09d
2016-02-29 05:32:43 +00:00
houming-wang 8176eb92db Do not use inner class of glanceclient
When initiate glanceclient, we should use 'glanceclient.client.Client'
instead of inner class 'glanceclient.v2.client.Client'

[1] http://docs.openstack.org/developer/python-glanceclient/ref/
    client.html

Change-Id: I65036aaac255264ae598e6166a0fd8ae25ed0e2d
Closes-Bug: #1533550
2016-01-14 20:09:01 +08:00
houming-wang 6748e5260e Do not use inner class of heatclient
When initiate heatclient, we should use 'heatclient.client.Client'
instead of inner class 'heatclient.v1.client.Client'

[1] http://docs.openstack.org/developer/python-heatclient/#python-api

Change-Id: Ifcb4b77d5f848679943acbb7d8924eaf0d11025f
Closes-Bug: #1533540
2016-01-14 19:37:21 +08:00
houming-wang a4fd1a9689 Do not use inner class of novaclient
Currently in Magnum, novaclient is initiated by directly call inner
class of novaclient: novaclient.v2.client.Client. But it's not designed
to be initialized directly. We should use 'novaclient.client.Client'.

Reference links:
[1] http://docs.openstack.org/developer/python-novaclient/api.html#usage
[2] https://launchpad.net/bugs/1493576

Change-Id: I85c37e7934962c9f01a4be1131808222c315ba45
Closes-Bug: #1533510
2016-01-14 19:14:23 +08:00
houming-wang e5bdfb9b49 Trival: Remove unused logging import
In some Magnum source code files, oslo log is imported but not used.
Remove it.
from oslo_log import logging
LOG = logging.getLogger(__name__)

Closes-Bug: #1529253
Change-Id: I4d3911b94aed4c74b8163993b38e756139198049
2015-12-25 09:41:22 -05:00
houming-wang 27e52ec206 add neutron client support
For good user experience, we should validate if Baymodel's network
is existed in Bay creation. Currently in Magnum there is no Neutron
client support. Neutron client is added for network related
resources validation.

Change-Id: I5668e3b67b8addbff14c7f859a5124c099f35a88
Patially-Implements: blueprint api-parameter-validation
2015-11-26 22:18:36 -05:00
houming-wang b90aca1817 remove default=None for config options
In the config module default=None is set as the default value,
it isn't necessary to set it again when doing config options.

Change-Id: Id6bbdb3c6b23bcc31d7a02057a73729e89cabb5c
Closes-Bug: #1323975
2015-11-07 11:25:42 -05:00
Hua Wang d52237d89a Code refactor for keystoneclient
1.Rename magnum_keystone_client to keystone.
2.Code refactor to let keystoneclient can create trust for
any user, not only admin user.

Change-Id: Iac20185f2cc89ac8d6fe7cf30b2362302614df77
Partially-Implements: blueprint generate-keystone-trust
2015-09-22 17:32:24 +08:00
Bharath Thiruveedula 6249e776eb "keypair_id" should be existent when creating a baymodel
While creating the baymodel we must check existence of keypair-id,
So that we can avoid keypair NotFound error while creating the bay.

Change-Id: I3796503bac05a9aa1c9d155e93447a95fb567daf
Closes-Bug: #1476500
2015-09-09 13:38:52 +05:30
OTSUKA, Yuanying 77d1e32c94 Fix keystone client usage in barbican client
In magnum.common.clients, barbican client uses
`keystone()._client` directly, but `keystone().client`
is better. Because, keystone()._client is None is it
is not loaded.

This fixes it.

Closes-Bug: #1491257
Change-Id: I3771ebef9c2a1d3756ea4ed2f964751d1c2da43f
2015-09-04 09:36:31 +09:00
Madhuri fbdd08d316 Add barbicanclient support in Magnum.
This adds barbicanclient support that will be used for supporting
TLS in Magnum.

Change-Id: Ife9747544a1ffa5aebd8512c6ea8ce381a5a8f38
Partially-Implements: blueprint barbican-support
2015-08-06 13:34:37 +09:00
OTSUKA, Yuanying 14401d216d Add magnum_url method to clients module
This patch add magnum_url method to get the magnum endpoint url which is
used for registering client certs from kubernetes master node to Magnum.

Change-Id: I9e3595cc3d217a47643db2d2c4efabc8e0c87ca2
Partially-Implements: bp secure-kubernetes
2015-07-29 10:21:55 +09:00
Tom Cammann 803caa547b Fix ignored E121 to E125 pep 8 rules
Fix pep8 violations for E121, E122, E123, E124, E125 and remove the
ignored rules from tox.ini.

E125 no longer should be ignored as the rule has been updated and shows
valid styling validation. Other style suggestions for writing long if
statements can be found here https://stackoverflow.com/questions/181530
if this rule violation causes any issue.

Closes-Bug: 1462955
Change-Id: Ic9a31a9dff15da634a97dfe9cdff6d367ecc17e9
2015-06-08 10:55:34 +00:00
Lan Qi song 17218a8011 Use oslo.log instead of oslo.incubator log module
oslo.log has graduated from oslo-incubator, magnum need use oslo.log
instead of oslo.incubator log module.

NOTE: openstack.common.log registers its options at import time, but
oslo.log needs to call register_options() explicitly.

Change-Id: I671bb020b628bd972813daf5936040b7f1c6bf7a
Closes-Bug: #1459736
2015-05-29 18:28:23 +08:00
Davanum Srinivas bf42ec94ef Setup for translation
To start translation, we need to initially import the
translation file - and place it at the proper place so that
the usual CI scripts can handle it.

The proper place is for all python projects
$PROJECT/locale/$PROJECT.pot - see setup.cfg.

Note that we were using _i18n.py from openstack/common
which is likely to go away, so created our own i18n.py
module per best practices:
http://docs.openstack.org/developer/oslo.i18n/usage.html#creating-an-integration-module

Further imports will be done by the OpenStack Proposal bot.

implements blueprint magnum-i18n-support
Change-Id: Ib34bfbe1ae47e077e92a4262642842c845d1a5d6
2015-05-24 03:13:55 +00:00
digambar 6e5d6fb444 Add glance support in magnum.
List of changes:
1. Added glanceclient implementation in magnum client.
2. Added testcases for glanceclient integration.

Change-Id: Ia6f46d61cbc1031b66e6f725b693a12071639a37
Implements: blueprint add-glance-image-properties-support
2015-04-08 10:48:20 +05:30
Cedric Brandily 679e31c1de Support keystone regions
This change enables keystone region support by defining the option
'region_name' in 'heat_client' section:

* magnum searchs only in region_name region for heat endpoint when
  region_name is not None,
* otherwise magnum search in all regions.

DocImpact
Closes-Bug: #1437049

Change-Id: Ib2895e7b56e48d6dfa8fe4680e12fc897d5cef03
2015-03-26 22:28:46 +01:00
Davanum Srinivas 17c5711c55 Remove imports from oslo namespaces
Oslo team is recommending everyone to use the direct imports and
not use the Oslo namespaces. So switch all our code to use oslo_*
instead of "from oslo." or "import oslo" or "from oslo"

NOTE: some of the tests still have mocks referring to oslo.utils
@mock.patch('oslo.utils.timeutils.utcnow')
as the tests break otherwise. We should do this later.

Closes-bug: #1419385
Change-Id: I8e3fbeb833cddc3f55674a0e781ffe69d5033ad4
2015-02-08 02:59:30 +00:00
OTSUKA, Yuanying 3d1bff28ab Fix keystoneclient and heatclient incompatibility
Previous version of heat client couldn't work correctly
because of keystone auth error in actual use.
So, heat client and keystone client are copied from solum.

Change-Id: I49fef01bcec581f470e05aa82526b31fe47d0adc
2014-12-31 07:03:06 +09:00