some test changes

This commit is contained in:
David Boucha 2012-11-19 16:19:58 -07:00
parent f56d9ebfcb
commit 5cdacccec6

View File

@ -4,25 +4,18 @@ Migration tools
# import
import os.path
def migrate_paths(master_or_minion = 'minion'):
def migrate_paths(opts):
'''
Migrate old minion and master file paths to new ones.
Migrate old minion and master pki file paths to new ones.
'''
oldsock_dir = '/var/run/salt'
newsock_dir = '/var/run/salt/{0}'.format(master_or_minion)
oldpki_dir = '/etc/salt/pki'
newpki_dir = '/etc/salt/pki/{0}'.format(master_or_minion)
if opts['default_include'].startswith('minion'):
newpki_dir = '/etc/salt/pki/minion'
if os.path.exists(oldpki_dir) and os.path.exists(newpki_dir):
pass
oldcache_dir = '/var/cache/salt'
newcache_dir = '/var/cache/salt/{0}'.format(master_or_minion)
if not os.path.exists(newsock_dir):
print 'migrate sock stuff'
if not os.path.exists(newpki_dir):
print 'migrate pki stuff'
if not os.path.exists(newcache_dir):
print 'migrate cache stuff'