From 5674cbd833c840fdfed61df01db6df163b67191d Mon Sep 17 00:00:00 2001 From: Ryan Walker Date: Tue, 28 Oct 2014 09:37:32 -0500 Subject: [PATCH] Change ohaisolo and poshohai domains This replaces the URLs for Ohai-Solo and Posh-Ohai to use a rackspace.com domain in order to help properly identitfy the source of the packages and prevent confusion to users on what is being done. In the future, this URL should be fully customizable to allow for someone to host their own Ohai-Solo/Posh-Ohai packages if they so choose. Closes-Bug: #1386745 Change-Id: If2b58846eb47c550614a94d73bdf33ac79ff9cf5 --- satori/sysinfo/ohai_solo.py | 3 ++- satori/sysinfo/posh_ohai.py | 4 ++-- satori/tests/test_sysinfo_ohai_solo.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/satori/sysinfo/ohai_solo.py b/satori/sysinfo/ohai_solo.py index f32f5f8..04ad084 100644 --- a/satori/sysinfo/ohai_solo.py +++ b/satori/sysinfo/ohai_solo.py @@ -111,7 +111,8 @@ def perform_install(client): "Target platform was %s", client.platform_info['dist']) else: # Download to host - command = "wget -N http://ohai.rax.io/install.sh" + command = ("wget -N http://readonly.configdiscovery.rackspace.com" + "/install.sh") output = client.execute(command, cwd='/tmp', escalate=True, allow_many=False) LOG.debug("Downloaded ohai-solo | %s", output['stdout']) diff --git a/satori/sysinfo/posh_ohai.py b/satori/sysinfo/posh_ohai.py index 717bd37..bbdbecb 100644 --- a/satori/sysinfo/posh_ohai.py +++ b/satori/sysinfo/posh_ohai.py @@ -100,8 +100,8 @@ def perform_install(client): if is_windows: powershell_command = ('[scriptblock]::Create((New-Object -TypeName ' 'System.Net.WebClient).DownloadString(' - '"http://ohai.rax.io/deploy.ps1"))' - '.Invoke()') + '"http://readonly.configdiscovery.rackspace.com' + '/deploy.ps1")).Invoke()') # check output to ensure that installation was successful # if not, raise SystemInfoCommandInstallFailed output = client.execute(powershell_command) diff --git a/satori/tests/test_sysinfo_ohai_solo.py b/satori/tests/test_sysinfo_ohai_solo.py index bfb27cc..b03ebc5 100644 --- a/satori/tests/test_sysinfo_ohai_solo.py +++ b/satori/tests/test_sysinfo_ohai_solo.py @@ -61,7 +61,7 @@ class TestOhaiInstall(utils.TestCase): self.assertEqual(result, response) self.assertEqual(self.mock_remotesshclient.execute.call_count, 3) self.mock_remotesshclient.execute.assert_has_calls([ - mock.call('wget -N http://ohai.rax.io/install.sh', cwd='/tmp', + mock.call('wget -N http://readonly.configdiscovery.rackspace.com/install.sh', cwd='/tmp', escalate=True, allow_many=False), mock.call('bash install.sh', cwd='/tmp', with_exit_code=True, escalate=True, allow_many=False),