You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ta...@apache.org on 2014/09/08 14:12:00 UTC
git commit: updated refs/heads/master to 40a537f
Repository: cloudstack
Updated Branches:
refs/heads/master 535e7a667 -> 40a537fed
CLOUDSTACK-7434: Fixed VM Internal name issue in test_custom_hostname.py
Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/40a537fe
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/40a537fe
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/40a537fe
Branch: refs/heads/master
Commit: 40a537fedcbb8c088875ef222c950213909df7f8
Parents: 535e7a6
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Fri Sep 5 21:13:23 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Mon Sep 8 17:41:27 2014 +0530
----------------------------------------------------------------------
.../integration/component/test_custom_hostname.py | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/40a537fe/test/integration/component/test_custom_hostname.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_custom_hostname.py b/test/integration/component/test_custom_hostname.py
index 22dbaf5..9d9008a 100644
--- a/test/integration/component/test_custom_hostname.py
+++ b/test/integration/component/test_custom_hostname.py
@@ -185,7 +185,6 @@ class TestInstanceNameFlagTrue(cloudstackTestCase):
return
-
@attr(configuration='vm.instancename.flag')
@attr(tags=["advanced", "basic", "sg", "eip", "advancedns", "simulator"], required_hardware="false")
def test_01_user_provided_hostname(self):
@@ -280,9 +279,18 @@ class TestInstanceNameFlagTrue(cloudstackTestCase):
self.debug("Query result: %s" % qresult)
vmid = qresult[0]
- #internal Name = i-<user ID>-<VM ID>-Display name
- internal_name = "i-" + str(account_id) + "-" + str(vmid) + "-" + vm.displayname
- self.debug("Internal name: %s" % internal_name)
+ self.debug("Fetching the global config value for instance.name")
+ configs = Configurations.list(
+ self.apiclient,
+ name="instance.name",
+ listall=True
+ )
+
+ config = configs[0]
+ instance_name = config.value
+
+ #internal Name = i-<user ID>-<VM ID>-instance.name flag value
+ internal_name = "i-" + str(account_id) + "-" + str(vmid) + "-" + instance_name
self.assertEqual(
vm.instancename,
internal_name,
@@ -473,6 +481,7 @@ class TestInstanceNameFlagTrue(cloudstackTestCase):
domainid=self.account.domainid,
serviceofferingid=self.service_offering.id,
)
+ self.cleanup.append(virtual_machine)
self.debug(
"Checking if the virtual machine is created properly or not?")
vms = VirtualMachine.list(
@@ -519,7 +528,6 @@ class TestInstanceNameFlagTrue(cloudstackTestCase):
self.skipTest('vm.instancename.flag should be true. skipping')
self.services["virtual_machine"]["displayname"] = "TestVM-test-name"
- self.services["virtual_machine"]["name"] = "TestVM"
self.debug("Deploying an instance in account: %s" %
self.account.name)