mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2017.7' into fix-add-saltenv-pillarenv-to-pillar-item
This commit is contained in:
commit
164314a859
4 changed files with 10 additions and 7 deletions
|
@ -48,9 +48,11 @@ def _search(prefix="latest/"):
|
|||
Recursively look up all grains in the metadata server
|
||||
'''
|
||||
ret = {}
|
||||
linedata = http.query(os.path.join(HOST, prefix))
|
||||
linedata = http.query(os.path.join(HOST, prefix), headers=True)
|
||||
if 'body' not in linedata:
|
||||
return ret
|
||||
if linedata['headers'].get('Content-Type', 'text/plain') == 'application/octet-stream':
|
||||
return linedata['body']
|
||||
for line in linedata['body'].split('\n'):
|
||||
if line.endswith('/'):
|
||||
ret[line[:-1]] = _search(prefix=os.path.join(prefix, line))
|
||||
|
|
|
@ -45,7 +45,8 @@ def __virtual__():
|
|||
'Void',
|
||||
'Mint',
|
||||
'Raspbian',
|
||||
'XenServer'
|
||||
'XenServer',
|
||||
'Cumulus'
|
||||
))
|
||||
if __grains__.get('os', '') in disable:
|
||||
return (False, 'Your OS is on the disabled list')
|
||||
|
|
|
@ -18,10 +18,6 @@ from tests.support.helpers import expensiveTest
|
|||
from salt.config import cloud_providers_config
|
||||
from salt.ext.six.moves import range # pylint: disable=import-error,redefined-builtin
|
||||
|
||||
# Create the cloud instance name to be used throughout the tests
|
||||
INSTANCE_NAME = _random_name('CLOUD-TEST-')
|
||||
PROVIDER_NAME = 'dimensiondata'
|
||||
|
||||
|
||||
def _random_name(size=6):
|
||||
'''
|
||||
|
@ -32,6 +28,10 @@ def _random_name(size=6):
|
|||
for x in range(size)
|
||||
)
|
||||
|
||||
# Create the cloud instance name to be used throughout the tests
|
||||
INSTANCE_NAME = _random_name()
|
||||
PROVIDER_NAME = 'dimensiondata'
|
||||
|
||||
|
||||
class DimensionDataTest(ShellCase):
|
||||
'''
|
||||
|
|
|
@ -78,7 +78,7 @@ class ProfitBricksTest(ShellCase):
|
|||
username = config[profile_str][DRIVER_NAME]['username']
|
||||
password = config[profile_str][DRIVER_NAME]['password']
|
||||
datacenter_id = config[profile_str][DRIVER_NAME]['datacenter_id']
|
||||
if username == '' or password == '' or datacenter_id == '':
|
||||
if username in ('' or 'foo') or password in ('' or 'bar') or datacenter_id == '':
|
||||
self.skipTest(
|
||||
'A username, password, and an datacenter must be provided to '
|
||||
'run these tests. Check '
|
||||
|
|
Loading…
Add table
Reference in a new issue