summaryrefslogtreecommitdiff
path: root/nova/tests/unit/test_metadata.py
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2017-07-05 15:29:17 +0100
committerMatt Riedemann <mriedem.os@gmail.com>2019-04-15 15:34:12 -0400
commit886b0a5d748ae1deda3a039734f831d7c0cf0476 (patch)
tree2707f4becfa9037c21007b89aa62bf8d5f17fd52 /nova/tests/unit/test_metadata.py
parent97549a2c416873ed0ef4a497095524516386579c (diff)
downloadnova-886b0a5d748ae1deda3a039734f831d7c0cf0476.tar.gz
conf: Undeprecate and move the 'dhcp_domain' option
The metadata service makes use of the deprecated '[DEFAULT] dhcp_domain' option when providing a hostname to the instance. This is used by cloud-init to configure the hostname in the instance. This use was not captured when the option was initially deprecated. This option is now undeprecated and moved to the '[api]' group to ensure it won't be removed alongside the other nova-network options. Change-Id: I3940ebd1888d8019716e7d4eb6d4a413a37b9b78 Closes-Bug: #1698010
Diffstat (limited to 'nova/tests/unit/test_metadata.py')
-rw-r--r--nova/tests/unit/test_metadata.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/tests/unit/test_metadata.py b/nova/tests/unit/test_metadata.py
index d8fe323956..a1ec39896a 100644
--- a/nova/tests/unit/test_metadata.py
+++ b/nova/tests/unit/test_metadata.py
@@ -311,14 +311,14 @@ class MetadataTestCase(test.TestCase):
self._test_security_groups()
def test_local_hostname(self):
- self.flags(dhcp_domain=None)
+ self.flags(dhcp_domain=None, group='api')
md = fake_InstanceMetadata(self, self.instance.obj_clone())
data = md.get_ec2_metadata(version='2009-04-04')
self.assertEqual(data['meta-data']['local-hostname'],
self.instance['hostname'])
def test_local_hostname_fqdn(self):
- self.flags(dhcp_domain='fakedomain')
+ self.flags(dhcp_domain='fakedomain', group='api')
md = fake_InstanceMetadata(self, self.instance.obj_clone())
data = md.get_ec2_metadata(version='2009-04-04')
self.assertEqual('%s.fakedomain' % self.instance['hostname'],