mburns72h pushed to os-cloud-config (master). "update to upstream version 0.2.6"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue May 12 12:42:48 UTC 2015
From 732975c6b12183236a1982430b96963f849e7654 Mon Sep 17 00:00:00 2001
From: Mike Burns <mburns at redhat.com>
Date: Tue, 12 May 2015 08:42:21 -0400
Subject: update to upstream version 0.2.6
diff --git a/.gitignore b/.gitignore
index 7d0e0d9..e934498 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/os-cloud-config-0.1.10.tar.gz
/os-cloud-config-0.1.11.tar.gz
/os-cloud-config-0.1.13.tar.gz
+/os-cloud-config-0.2.6.tar.gz
diff --git a/0001-Remove-runtime-dependency-on-pbr.patch b/0001-Remove-runtime-dependency-on-pbr.patch
deleted file mode 100644
index 7cac1a2..0000000
--- a/0001-Remove-runtime-dependency-on-pbr.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f18ffb30c182499b00217d837ec93921d8c857c6 Mon Sep 17 00:00:00 2001
-From: James Slagle <jslagle at redhat.com>
-Date: Tue, 6 Jan 2015 17:27:00 -0500
-Subject: [PATCH] Remove runtime dependency on pbr
-
----
- os_cloud_config/__init__.py | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/os_cloud_config/__init__.py b/os_cloud_config/__init__.py
-index 29f97ce..22f3ef6 100644
---- a/os_cloud_config/__init__.py
-+++ b/os_cloud_config/__init__.py
-@@ -12,7 +12,14 @@
- # License for the specific language governing permissions and limitations
- # under the License.
-
--import pbr.version
-+class VersionInfo(object):
-+ release = "REDHATRELEASE"
-+ version = "REDHATVERSION"
-
-+ def version_string(self):
-+ return self.version
-
--__version__ = pbr.version.VersionInfo('os_cloud_config').version_string()
-+ def release_string(self):
-+ return self.release
-+
-+__version__ = VersionInfo().version_string()
diff --git a/0001-Set-kernel-and-ramdisk-ID-for-ironic-nodes.patch b/0001-Set-kernel-and-ramdisk-ID-for-ironic-nodes.patch
new file mode 100644
index 0000000..46fcc6e
--- /dev/null
+++ b/0001-Set-kernel-and-ramdisk-ID-for-ironic-nodes.patch
@@ -0,0 +1,280 @@
+From d9f8c30393aab59097ebc41e1262e84490338b0e Mon Sep 17 00:00:00 2001
+From: Clint Byrum <clint at fewbar.com>
+Date: Thu, 11 Dec 2014 15:46:34 -0800
+Subject: [PATCH] Set kernel and ramdisk ID for ironic nodes
+
+Ironic has deprecated per-flavor ramdisk and kernel image IDs in favor
+of setting them per-node. These parameters are optional to preserve
+backward compatibility. For ease of use, the command line client takes
+the kernel and ramdisk name and looks up the ID via glance. Also, they
+are completely ignored on nova-bm since it does not have a per-node
+setting for these ids.
+
+Co-Authored-By: Steve Kowalik <steven at wedontsleep.org>
+
+Change-Id: I702afe81038b6f962ce383edb58227a6015c2a75
+Partial-Bug: #1401617
+---
+ os_cloud_config/cmd/register_nodes.py | 11 +++++-
+ os_cloud_config/cmd/tests/test_register_nodes.py | 23 ++++++++---
+ os_cloud_config/nodes.py | 28 ++++++++++++--
+ os_cloud_config/tests/test_nodes.py | 49 +++++++++++++++++++++---
+ 4 files changed, 96 insertions(+), 15 deletions(-)
+
+diff --git a/os_cloud_config/cmd/register_nodes.py b/os_cloud_config/cmd/register_nodes.py
+index 20b0654..2ff1d03 100644
+--- a/os_cloud_config/cmd/register_nodes.py
++++ b/os_cloud_config/cmd/register_nodes.py
+@@ -50,6 +50,12 @@ def parse_args():
+ parser.add_argument('-r', '--remove', dest='remove', action='store_true',
+ help='Remove all unspecified nodes from the baremetal '
+ 'service. Use with extreme caution!')
++ parser.add_argument('-k', '--kernel-name', dest='kernel_name',
++ help='Default kernel name (in Glance) for nodes that '
++ 'do not specify one.')
++ parser.add_argument('-d', '--ramdisk-name', dest='ramdisk_name',
++ help='Default ramdisk name (in Glance) for nodes that '
++ 'do not specify one.')
+ environment._add_logging_arguments(parser)
+ return parser.parse_args()
+
+@@ -64,6 +70,7 @@ def main():
+ environment._ensure()
+
+ keystone_client = _clients.get_keystone_client()
++ glance_client = _clients.get_glance_client()
+ if nodes.using_ironic(keystone=keystone_client):
+ client = _clients.get_ironic_client()
+ else:
+@@ -71,7 +78,9 @@ def main():
+
+ nodes.register_all_nodes(
+ args.service_host, nodes_list, client=client, remove=args.remove,
+- blocking=True, keystone_client=keystone_client)
++ blocking=True, keystone_client=keystone_client,
++ glance_client=glance_client, kernel_name=args.kernel_name,
++ ramdisk_name=args.ramdisk_name)
+ except Exception:
+ logging.exception("Unexpected error during command execution")
+ return 1
+diff --git a/os_cloud_config/cmd/tests/test_register_nodes.py b/os_cloud_config/cmd/tests/test_register_nodes.py
+index d3f95a5..fb41fc5 100644
+--- a/os_cloud_config/cmd/tests/test_register_nodes.py
++++ b/os_cloud_config/cmd/tests/test_register_nodes.py
+@@ -24,6 +24,8 @@ from os_cloud_config.tests import base
+
+ class RegisterNodesTest(base.TestCase):
+
++ @mock.patch('os_cloud_config.cmd.utils._clients.get_glance_client',
++ return_value='glance_client_mock')
+ @mock.patch('os_cloud_config.cmd.utils._clients.get_nova_bm_client',
+ return_value='nova_bm_client_mock')
+ @mock.patch('os_cloud_config.cmd.utils._clients.get_keystone_client',
+@@ -37,7 +39,8 @@ class RegisterNodesTest(base.TestCase):
+ def test_with_arguments_nova_baremetal(self, register_mock,
+ using_ironic_mock,
+ get_keystone_client_mock,
+- get_nova_bm_client_mock):
++ get_nova_bm_client_mock,
++ get_glance_client_mock):
+ with tempfile.NamedTemporaryFile() as f:
+ f.write(u'{}\n'.encode('utf-8'))
+ f.flush()
+@@ -46,14 +49,19 @@ class RegisterNodesTest(base.TestCase):
+
+ register_mock.assert_called_once_with(
+ "seed", {}, client='nova_bm_client_mock', remove=False,
+- blocking=True, keystone_client='keystone_client_mock')
++ blocking=True, keystone_client='keystone_client_mock',
++ glance_client='glance_client_mock', kernel_name=None,
++ ramdisk_name=None)
+ using_ironic_mock.assert_called_once_with(
+ keystone='keystone_client_mock')
+ get_keystone_client_mock.assert_called_once_with()
+ get_nova_bm_client_mock.assert_called_once_with()
++ get_glance_client_mock.assert_called_once_with()
+
+ self.assertEqual(0, return_code)
+
++ @mock.patch('os_cloud_config.cmd.utils._clients.get_glance_client',
++ return_value='glance_client_mock')
+ @mock.patch('os_cloud_config.cmd.utils._clients.get_ironic_client',
+ return_value='ironic_client_mock')
+ @mock.patch('os_cloud_config.cmd.utils._clients.get_keystone_client',
+@@ -63,11 +71,13 @@ class RegisterNodesTest(base.TestCase):
+ @mock.patch.dict('os.environ', {'OS_USERNAME': 'a', 'OS_PASSWORD': 'a',
+ 'OS_TENANT_NAME': 'a', 'OS_AUTH_URL': 'a'})
+ @mock.patch.object(sys, 'argv', ['register-nodes', '--service-host',
+- 'seed', '--nodes'])
++ 'seed', '--ramdisk-name', 'bm-ramdisk',
++ '--kernel-name', 'bm-kernel', '--nodes'])
+ def test_with_arguments_ironic(self, register_mock,
+ using_ironic_mock,
+ get_keystone_client_mock,
+- get_ironic_client_mock):
++ get_ironic_client_mock,
++ get_glance_client_mock):
+ with tempfile.NamedTemporaryFile() as f:
+ f.write(u'{}\n'.encode('utf-8'))
+ f.flush()
+@@ -76,11 +86,14 @@ class RegisterNodesTest(base.TestCase):
+
+ register_mock.assert_called_once_with(
+ "seed", {}, client='ironic_client_mock', remove=False,
+- blocking=True, keystone_client='keystone_client_mock')
++ blocking=True, keystone_client='keystone_client_mock',
++ glance_client='glance_client_mock',
++ kernel_name='bm-kernel', ramdisk_name='bm-ramdisk')
+ using_ironic_mock.assert_called_once_with(
+ keystone='keystone_client_mock')
+ get_keystone_client_mock.assert_called_once_with()
+ get_ironic_client_mock.assert_called_once_with()
++ get_glance_client_mock.assert_called_once_with()
+
+ self.assertEqual(0, return_code)
+
+diff --git a/os_cloud_config/nodes.py b/os_cloud_config/nodes.py
+index c5d2cd0..96beab5 100644
+--- a/os_cloud_config/nodes.py
++++ b/os_cloud_config/nodes.py
+@@ -21,6 +21,7 @@ from novaclient.openstack.common.apiclient import exceptions as novaexc
+ import six
+
+ from os_cloud_config.cmd.utils import _clients as clients
++from os_cloud_config import glance
+
+ LOG = logging.getLogger(__name__)
+
+@@ -92,6 +93,11 @@ def _extract_driver_info(node):
+ driver_info["iboot_port"] = node["pm_port"]
+ else:
+ raise ValueError("Unknown pm_type: %s" % node["pm_type"])
++ if "pxe" in node["pm_type"]:
++ if "kernel_id" in node:
++ driver_info["pxe_deploy_kernel"] = node["kernel_id"]
++ if "ramdisk_id" in node:
++ driver_info["pxe_deploy_ramdisk"] = node["ramdisk_id"]
+ return driver_info
+
+
+@@ -249,9 +255,15 @@ def _clean_up_extra_nodes(ironic_in_use, seen, client, remove=False):
+
+
+ def _register_list_of_nodes(register_func, node_map, client, nodes_list,
+- blocking, service_host):
++ blocking, service_host, kernel_id, ramdisk_id):
+ seen = set()
+ for node in nodes_list:
++ if kernel_id:
++ if 'kernel_id' not in node:
++ node['kernel_id'] = kernel_id
++ if ramdisk_id:
++ if 'ramdisk_id' not in node:
++ node['ramdisk_id'] = ramdisk_id
+ try:
+ new_node = register_func(service_host, node, node_map,
+ client=client, blocking=blocking)
+@@ -263,7 +275,8 @@ def _register_list_of_nodes(register_func, node_map, client, nodes_list,
+
+
+ def register_all_nodes(service_host, nodes_list, client=None, remove=False,
+- blocking=True, keystone_client=None):
++ blocking=True, keystone_client=None, glance_client=None,
++ kernel_name=None, ramdisk_name=None):
+ LOG.debug('Registering all nodes.')
+ ironic_in_use = using_ironic(keystone=keystone_client)
+ if ironic_in_use:
+@@ -279,8 +292,17 @@ def register_all_nodes(service_host, nodes_list, client=None, remove=False,
+ client = clients.get_nova_bm_client()
+ register_func = _update_or_register_bm_node
+ node_map = _populate_node_mapping(ironic_in_use, client)
++ glance_ids = {'kernel': None, 'ramdisk': None}
++ if kernel_name and ramdisk_name:
++ if glance_client is None:
++ LOG.warn('Creating glance client inline is deprecated, please '
++ 'pass the client as a parameter.')
++ client = clients.get_glance_client()
++ glance_ids = glance.create_or_find_kernel_and_ramdisk(
++ glance_client, kernel_name, ramdisk_name)
+ seen = _register_list_of_nodes(register_func, node_map, client,
+- nodes_list, blocking, service_host)
++ nodes_list, blocking, service_host,
++ glance_ids['kernel'], glance_ids['ramdisk'])
+ _clean_up_extra_nodes(ironic_in_use, seen, client, remove=remove)
+
+
+diff --git a/os_cloud_config/tests/test_nodes.py b/os_cloud_config/tests/test_nodes.py
+index 72a51aa..101e0db 100644
+--- a/os_cloud_config/tests/test_nodes.py
++++ b/os_cloud_config/tests/test_nodes.py
+@@ -49,7 +49,8 @@ class NodesTest(base.TestCase):
+ register_func = mock.MagicMock()
+ register_func.side_effect = [return_node, ironicexp.Conflict]
+ seen = nodes._register_list_of_nodes(register_func, {}, None,
+- nodes_list, False, 'servicehost')
++ nodes_list, False, 'servicehost',
++ None, None)
+ self.assertEqual(seen, set(nodes_list))
+
+ @mock.patch('time.sleep')
+@@ -186,12 +187,16 @@ class NodesTest(base.TestCase):
+ "iboot_port": "8080"}
+ self.assertEqual(expected, nodes._extract_driver_info(node))
+
+- def test_extract_driver_info_pxe_ilo(self):
++ def test_extract_driver_info_pxe_ipmi_with_kernel_ramdisk(self):
+ node = self._get_node()
+- node["pm_type"] = "pxe_ilo"
+- expected = {"ilo_address": "foo.bar",
+- "ilo_username": "test",
+- "ilo_password": "random"}
++ node["pm_type"] = "pxe_ipmi"
++ node["kernel_id"] = "kernel-abc"
++ node["ramdisk_id"] = "ramdisk-foo"
++ expected = {"ipmi_address": "foo.bar",
++ "ipmi_username": "test",
++ "ipmi_password": "random",
++ "pxe_deploy_kernel": "kernel-abc",
++ "pxe_deploy_ramdisk": "ramdisk-foo"}
+ self.assertEqual(expected, nodes._extract_driver_info(node))
+
+ def test_extract_driver_info_unknown_type(self):
+@@ -223,6 +228,38 @@ class NodesTest(base.TestCase):
+ ironic.port.create.assert_has_calls([port_call])
+ ironic.node.set_power_state.assert_has_calls([power_off_call])
+
++ @mock.patch('os_cloud_config.nodes.using_ironic', return_value=True)
++ def test_register_all_nodes_ironic_kernel_ramdisk(self, using_ironic):
++ node_list = [self._get_node()]
++ node_properties = {"cpus": "1",
++ "memory_mb": "2048",
++ "local_gb": "30",
++ "cpu_arch": "amd64"}
++ ironic = mock.MagicMock()
++ glance = mock.MagicMock()
++ image = collections.namedtuple('image', ['id'])
++ glance.images.find.side_effect = (image('kernel-123'),
++ image('ramdisk-999'))
++ nodes.register_all_nodes('servicehost', node_list, client=ironic,
++ glance_client=glance, kernel_name='bm-kernel',
++ ramdisk_name='bm-ramdisk')
++ pxe_node_driver_info = {"ssh_address": "foo.bar",
++ "ssh_username": "test",
++ "ssh_key_contents": "random",
++ "ssh_virt_type": "virsh",
++ "pxe_deploy_kernel": "kernel-123",
++ "pxe_deploy_ramdisk": "ramdisk-999"}
++ pxe_node = mock.call(driver="pxe_ssh",
++ driver_info=pxe_node_driver_info,
++ properties=node_properties)
++ port_call = mock.call(node_uuid=ironic.node.create.return_value.uuid,
++ address='aaa')
++ power_off_call = mock.call(ironic.node.create.return_value.uuid, 'off')
++ using_ironic.assert_called_once_with(keystone=None)
++ ironic.node.create.assert_has_calls([pxe_node, mock.ANY])
++ ironic.port.create.assert_has_calls([port_call])
++ ironic.node.set_power_state.assert_has_calls([power_off_call])
++
+ @mock.patch('time.sleep')
+ def test_register_ironic_node_retry(self, sleep):
+ ironic = mock.MagicMock()
diff --git a/0002-Clean-up-usage.rst.patch b/0002-Clean-up-usage.rst.patch
new file mode 100644
index 0000000..53b5c11
--- /dev/null
+++ b/0002-Clean-up-usage.rst.patch
@@ -0,0 +1,224 @@
+From 5060eba075e16c3f5f00e738e990b237c00eafbe Mon Sep 17 00:00:00 2001
+From: James Polley <jp at jamezpolley.com>
+Date: Thu, 22 Jan 2015 18:45:28 +0000
+Subject: [PATCH] Clean up usage.rst
+
+Various changes to help usage.rst make more use of RST features,
+particular inline code snippets.
+
+The intent here is mostly to make the doc more readable by being more
+clear about which values are exact filenames, exact network names, and
+so on.
+
+Change-Id: Ic7335379a3c036a1265cac7032042fa351d5606e
+---
+ doc/source/usage.rst | 69 ++++++++++++++++++++++++++--------------------------
+ 1 file changed, 35 insertions(+), 34 deletions(-)
+
+diff --git a/doc/source/usage.rst b/doc/source/usage.rst
+index b6aef6d..5628ba6 100644
+--- a/doc/source/usage.rst
++++ b/doc/source/usage.rst
+@@ -4,20 +4,20 @@ Usage
+
+ To use os-cloud-config in a project::
+
+- import os_cloud_config
++ import os_cloud_config
+
+ -----------------------------------
+ Initializing Keystone for a host
+ -----------------------------------
+
+-The init-keystone command line utility initializes Keystone for use with normal
++The ``init-keystone`` command line utility initializes Keystone for use with normal
+ authentication by creating the admin and service tenants, the admin role, the
+ admin user, configure certificates and finally registers the initial identity
+ endpoint.
+
+ .. note::
+
+- init-keystone will wait for a user-specified amount of time for a Keystone
++ init-keystone will wait for a user-specified amount of time for a Keystone
+ service to be running on the specified host. The default is a 10 minute
+ wait time with 10 seconds between poll attempts.
+
+@@ -25,15 +25,15 @@ For example::
+
+ init-keystone -o 192.0.2.1 -t unset -e admin at example.com -p unset -u root
+
+-That acts on the 192.0.2.1 host, sets the admin token and the admin password
+-to the string "unset", the admin e-mail address to "admin at example.com", and
++That acts on the host ``192.0.2.1``, sets the admin token and the admin password
++to the string ``unset``, the admin e-mail address to ``admin at example.com``, and
+ uses the root user to connect to the host via ssh to configure certificates.
+
+ --------------------------------------------
+ Registering nodes with a baremetal service
+ --------------------------------------------
+
+-The register-nodes command line utility supports registering nodes with
++The ``register-nodes`` command line utility supports registering nodes with
+ either Ironic or Nova-baremetal. Ironic will be used if the Ironic service
+ is registered with Keystone.
+
+@@ -61,7 +61,7 @@ For example::
+
+ register-nodes -s seed -n /tmp/one-node
+
+-Where /tmp/one-node contains::
++Where ``/tmp/one-node`` contains::
+
+ [
+ {
+@@ -83,7 +83,7 @@ Where /tmp/one-node contains::
+ Generating keys and certificates for use with Keystone PKI
+ ----------------------------------------------------------
+
+-The generate-keystone-pki command line utility generates keys and certificates
++The ``generate-keystone-pki`` command line utility generates keys and certificates
+ which Keystone uses for signing authentication tokens.
+
+ - Keys and certificates can be generated into separate files::
+@@ -91,13 +91,13 @@ which Keystone uses for signing authentication tokens.
+ generate-keystone-pki /tmp/certificates
+
+ That creates four files with signing and CA keys and certificates in
+- /tmp/certificates directory.
++ ``/tmp/certificates`` directory.
+
+ - Key and certificates can be generated into heat environment file::
+
+ generate-keystone-pki -j overcloud-env.json
+
+- That adds following values into overcloud-env.json file::
++ That adds following values into ``overcloud-env.json`` file::
+
+ {
+ "parameters": {
+@@ -129,7 +129,7 @@ which Keystone uses for signing authentication tokens.
+ Setting up networking
+ ---------------------
+
+-The setup-neutron command line utility allows setting up of a physical control
++The ``setup-neutron`` command line utility allows setting up of a physical control
+ plane network suitable for deployment clouds, or an external network with an
+ internal floating network suitable for workload clouds.
+
+@@ -137,7 +137,7 @@ The network JSON argument allows specifying the network(s) to be created::
+
+ setup-neutron -n /tmp/ctlplane
+
+-Where /tmp/ctlplane contains::
++Where ``/tmp/ctlplane`` contains::
+
+ {
+ "physical": {
+@@ -150,16 +150,16 @@ Where /tmp/ctlplane contains::
+ }
+ }
+
+-This will create a Neutron flat net with a name of 'ctlplane', and a subnet
+-with a CIDR of '192.0.2.0/24', a metadata server and gateway of '192.0.2.1',
+-and will allocate DHCP leases in the range of '192.0.2.2' to '192.0.2.20', as
+-well as adding a route for 169.254.169.254/32.
++This will create a Neutron flat net with a name of ``ctlplane``, and a subnet
++with a CIDR of ``192.0.2.0/24``, a metadata server and gateway of ``192.0.2.1``,
++and will allocate DHCP leases in the range of ``192.0.2.2`` to ``192.0.2.20``, as
++well as adding a route for ``169.254.169.254/32``.
+
+ setup-neutron also supports datacentre networks that require 802.1Q VLAN tags::
+
+ setup-neutron -n /tmp/ctlplane-dc
+
+-Where /tmp/ctlplane-dc contains::
++Where ``/tmp/ctlplane-dc`` contains::
+
+ {
+ "physical": {
+@@ -174,8 +174,9 @@ Where /tmp/ctlplane-dc contains::
+ }
+ }
+
+-This creates a Neutron 'net' called ``public`` using VLAN tag 25, that uses
+-the existing 'net' called ``ctlplane`` as a physical transport.
++This creates a Neutron 'net' called ``public`` using VLAN tag ``25``, that uses
++an existing 'net' called ``ctlplane`` as a physical transport.
++
+
+ .. note::
+
+@@ -186,7 +187,7 @@ setup-neutron can also create two networks suitable for workload clouds::
+
+ setup-neutron -n /tmp/float
+
+-Where /tmp/float contains::
++Where ``/tmp/float`` contains::
+
+ {
+ "float": {
+@@ -202,19 +203,19 @@ Where /tmp/float contains::
+ }
+ }
+
+-This creates two Neutron nets, the first with a name of 'default-net' and set
+-as shared, and second with a name 'ext-net' with the 'router:external'
+-property set to true. The default-net subnet has a CIDR of 10.0.0.0/8 and a
+-default nameserver of 8.8.8.8, and the ext-net subnet has a CIDR of
+-192.0.2.0/24, a gateway of 192.0.2.1 and allocates DHCP from 192.0.2.45 until
+-192.0.2.64. setup-neutron will also create a router for the float network,
+-setting the external network as the gateway.
++This creates two Neutron nets, the first with a name of ``default-net`` and
++set as shared, and second with a name ``ext-net`` with the ``router:external``
++property set to true. The ``default-net`` subnet has a CIDR of ``10.0.0.0/8`` and a
++default nameserver of ``8.8.8.8``, and the ``ext-net`` subnet has a CIDR of
++``192.0.2.0/24``, a gateway of ``192.0.2.1`` and allocates DHCP from
++``192.0.2.45`` until ``192.0.2.64``. setup-neutron will also create a router
++for the float network, setting the external network as the gateway.
+
+ ----------------
+ Creating flavors
+ ----------------
+
+-The setup-flavors command line utility creates flavors in Nova -- either using
++The ``setup-flavors`` command line utility creates flavors in Nova -- either using
+ the nodes that have been registered to provide a distinct set of hardware that
+ is provisioned, or by specifing the set of flavors that should be created.
+
+@@ -225,22 +226,22 @@ is provisioned, or by specifing the set of flavors that should be created.
+ is a cloud only using baremetal hardware, so only needs to describe the
+ hardware available.
+
+-Utilising the /tmp/one-node file specified in the register-nodes example
++Utilising the ``/tmp/one-node`` file specified in the ``register-nodes`` example
+ above, create a flavor::
+
+ setup-flavors -n /tmp/one-node
+
+-Which results in a flavor called "baremetal_2048_30_None_1".
++Which results in a flavor called ``baremetal_2048_30_None_1``.
+
+-If the ROOT_DISK environment variable is set in the environment, that will be
++If the ``ROOT_DISK`` environment variable is set in the environment, that will be
+ used as the disk size, leaving the remainder set as ephemeral storage, giving
+-a flavor name of "baremetal_2048_10_20_1".
++a flavor name of ``baremetal_2048_10_20_1``.
+
+ Conversely, you can specify a JSON file describing the flavors to create::
+
+ setup-flavors -f /tmp/one-flavor
+
+-Where /tmp/one-flavor contains::
++Where ``/tmp/one-flavor`` contains::
+
+ [
+ {
+@@ -252,7 +253,7 @@ Where /tmp/one-flavor contains::
+ }
+ ]
+
+-The JSON file can also contain an 'extra_specs' parameter, which is a JSON
++The JSON file can also contain an ``extra_specs`` parameter, which is a JSON
+ object describing the key-value pairs to add into the flavor metadata::
+
+ [
diff --git a/0003-Add-pxe_drac-driver-support-to-os-cloud-config.patch b/0003-Add-pxe_drac-driver-support-to-os-cloud-config.patch
new file mode 100644
index 0000000..1374119
--- /dev/null
+++ b/0003-Add-pxe_drac-driver-support-to-os-cloud-config.patch
@@ -0,0 +1,79 @@
+From 184f8da89db68f05be2d6b11fb4b4d03ebfa7ea3 Mon Sep 17 00:00:00 2001
+From: Victor Lowther <victor.lowther at gmail.com>
+Date: Wed, 8 Apr 2015 13:50:33 -0500
+Subject: [PATCH] Add pxe_drac driver support to os-cloud-config
+
+The pxe_drac driver has been in Ironic for awhile, may as well
+have support for it.
+
+Change-Id: I4e53d290b3ca16281ec49eba6c7702d96aa32cfd
+---
+ os_cloud_config/nodes.py | 11 +++++++++++
+ os_cloud_config/tests/test_nodes.py | 11 +++++++++++
+ 2 files changed, 22 insertions(+)
+
+diff --git a/os_cloud_config/nodes.py b/os_cloud_config/nodes.py
+index 96beab5..0a46607 100644
+--- a/os_cloud_config/nodes.py
++++ b/os_cloud_config/nodes.py
+@@ -71,6 +71,10 @@ def _extract_driver_info(node):
+ driver_info = {"ipmi_address": node["pm_addr"],
+ "ipmi_username": node["pm_user"],
+ "ipmi_password": node["pm_password"]}
++ elif node["pm_type"] == "pxe_drac":
++ driver_info = {"drac_host": node["pm_addr"],
++ "drac_username": node["pm_user"],
++ "drac_password": node["pm_password"]}
+ elif node["pm_type"] == "pxe_ssh":
+ if "pm_virt_type" not in node:
+ node["pm_virt_type"] = "virsh"
+@@ -157,6 +161,9 @@ def _populate_node_mapping(ironic_in_use, client):
+ elif node_details.driver == 'pxe_ilo':
+ pm_addr = node_details.driver_info['ilo_address']
+ node_map['pm_addr'][pm_addr] = node['uuid']
++ elif node_details.driver == 'pxe_drac':
++ pm_addr = node_details.driver_info['drac_host']
++ node_map['pm_addr'][pm_addr] = node['uuid']
+ else:
+ nodes = [bmn.to_dict() for bmn in client.baremetal.list()]
+ for node in nodes:
+@@ -210,6 +217,10 @@ def _update_or_register_ironic_node(service_host, node, node_map, client=None,
+ massage_map.update({'pm_addr': '/driver_info/ilo_address',
+ 'pm_user': '/driver_info/ilo_username',
+ 'pm_password': '/driver_info/ilo_password'})
++ elif node['pm_type'] == 'pxe_drac':
++ massage_map.update({'pm_addr': '/driver_info/drac_host',
++ 'pm_user': '/driver_info/drac_username',
++ 'pm_password': '/driver_info/drac_password'})
+ if node_uuid:
+ ironic_node = client.node.get(node_uuid)
+ else:
+diff --git a/os_cloud_config/tests/test_nodes.py b/os_cloud_config/tests/test_nodes.py
+index 101e0db..899c09f 100644
+--- a/os_cloud_config/tests/test_nodes.py
++++ b/os_cloud_config/tests/test_nodes.py
+@@ -149,6 +149,14 @@ class NodesTest(base.TestCase):
+ "ssh_virt_type": "virsh"}
+ self.assertEqual(expected, nodes._extract_driver_info(node))
+
++ def test_extract_driver_info_pxe_drac(self):
++ node = self._get_node()
++ node["pm_type"] = "pxe_drac"
++ expected = {"drac_host": "foo.bar",
++ "drac_username": "test",
++ "drac_password": "random"}
++ self.assertEqual(expected, nodes._extract_driver_info(node))
++
+ def test_extract_driver_info_pxe_ssh_with_pm_virt_type(self):
+ node = self._get_node()
+ node["pm_type"] = "pxe_ssh"
+@@ -321,6 +329,9 @@ class NodesTest(base.TestCase):
+ def test_update_node_ironic_pxe_ipmitool(self):
+ self._update_by_type('pxe_ipmitool')
+
++ def test_ipdate_node_ironic_pxe_drac(self):
++ self._update_by_type('pxe_drac')
++
+ def test_update_node_ironic_pxe_ilo(self):
+ self._update_by_type('pxe_ilo')
+
diff --git a/0004-Updated-from-global-requirements.patch b/0004-Updated-from-global-requirements.patch
new file mode 100644
index 0000000..57f674b
--- /dev/null
+++ b/0004-Updated-from-global-requirements.patch
@@ -0,0 +1,43 @@
+From 38d4e3a5cbeedeed095772f2c547f5b7b8756e85 Mon Sep 17 00:00:00 2001
+From: OpenStack Proposal Bot <openstack-infra at lists.openstack.org>
+Date: Thu, 23 Apr 2015 15:36:11 +0000
+Subject: [PATCH] Updated from global requirements
+
+Change-Id: I8eead71229108af5373cc2cd2b13d86b3738280f
+---
+ requirements.txt | 10 +++++-----
+ test-requirements.txt | 2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/requirements.txt b/requirements.txt
+index bd6b576..ecc316e 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -8,9 +8,9 @@ Babel>=1.3
+ python-glanceclient>=0.15.0
+ python-ironicclient>=0.2.1
+ python-keystoneclient>=1.1.0
+-python-neutronclient>=2.3.6,<3
+-python-novaclient>=2.18.0,!=2.21.0
+-oslo.config>=1.6.0 # Apache-2.0
+-oslo.i18n>=1.3.0 # Apache-2.0
++python-neutronclient>=2.3.11,<3
++python-novaclient>=2.22.0
++oslo.config>=1.9.3 # Apache-2.0
++oslo.i18n>=1.5.0 # Apache-2.0
+ pyOpenSSL>=0.11
+-six>=1.7.0
++six>=1.9.0
+diff --git a/test-requirements.txt b/test-requirements.txt
+index 7c09571..7d47196 100644
+--- a/test-requirements.txt
++++ b/test-requirements.txt
+@@ -9,7 +9,7 @@ fixtures>=0.3.14
+ mock>=1.0
+ python-subunit>=0.0.18
+ sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
+-oslosphinx>=2.2.0 # Apache-2.0
++oslosphinx>=2.5.0 # Apache-2.0
+ testrepository>=0.0.18
+ testscenarios>=0.4
+ testtools>=0.9.36,!=1.2.0
diff --git a/os-cloud-config.spec b/os-cloud-config.spec
index b244a79..cf430b4 100644
--- a/os-cloud-config.spec
+++ b/os-cloud-config.spec
@@ -1,13 +1,20 @@
Name: os-cloud-config
-Version: 0.1.13
-Release: 3%{?dist}
+Version: 0.2.6
+Release: 1%{?dist}
Summary: Configuration for OpenStack clouds
License: ASL 2.0
URL: http://pypi.python.org/pypi/%{name}
Source0: http://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz
-Patch0001: 0001-Remove-runtime-dependency-on-pbr.patch
+#
+# patches_base=+1
+#
+
+Patch0001: 0001-Set-kernel-and-ramdisk-ID-for-ironic-nodes.patch
+Patch0002: 0002-Clean-up-usage.rst.patch
+Patch0003: 0003-Add-pxe_drac-driver-support-to-os-cloud-config.patch
+Patch0004: 0004-Updated-from-global-requirements.patch
BuildArch: noarch
BuildRequires: python-setuptools
@@ -32,6 +39,9 @@ configuration of OpenStack clouds.
%setup -q -n %{name}-%{version}
%patch0001 -p1
+%patch0002 -p1
+%patch0003 -p1
+%patch0004 -p1
%build
%{__python} setup.py build
@@ -48,8 +58,14 @@ configuration of OpenStack clouds.
%{_bindir}/register-nodes
%{_bindir}/setup-endpoints
%{_bindir}/setup-neutron
+%{_bindir}/init-keystone-heat-domain
+%{_bindir}/setup-flavors
+%{_bindir}/upload-kernel-ramdisk
%changelog
+* Fri May 08 2015 Mike Burns <mburns at redhat.com> 0.2.6-1
+- Update to upstream 0.2.6
+
* Tue Jan 06 2015 James Slagle <jslagle at redhat.com> 0.1.13-3
- Update Remove runtime dependency on pbr patch
diff --git a/sources b/sources
index c2ba03e..e1b14ee 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7498e4517d19d2c53e757d4953f3fd5c os-cloud-config-0.1.13.tar.gz
+1b1611655d30936e0ec494c0d31c5e71 os-cloud-config-0.2.6.tar.gz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/os-cloud-config.git/commit/?h=master&id=732975c6b12183236a1982430b96963f849e7654
More information about the scm-commits
mailing list