__author__ = '@dominofire'

import os

from sweeper.cloud import resource_config_combinations
from sweeper.cloud.localhost import resource_config_factory as config_factory
from sweeper.resource import Resource


def possible_configs(num):
    configs = config_factory.list_configs()
    combs = resource_config_combinations(num, configs)

    return combs


def create_resource(name, config_object):
    res = Resource(config_object, name, 'localhost', None, None)

    return res


def mount_distributed_file_system(name, vm_resources):
    vm_first = vm_resources[0]
    vm_first.execute_command('mkdir ./fileshare')

    return os.path.join(os.getcwd(), 'fileshare')

[((11, 14, 11, 43), 'sweeper.cloud.localhost.resource_config_factory.list_configs', 'config_factory.list_configs', ({}, {}), '()', True, 'from sweeper.cloud.localhost import resource_config_factory as config_factory\n'), ((12, 12, 12, 54), 'sweeper.cloud.resource_config_combinations', 'resource_config_combinations', ({(12, 41, 12, 44): 'num', (12, 46, 12, 53): 'configs'}, {}), '(num, configs)', False, 'from sweeper.cloud import resource_config_combinations\n'), ((18, 10, 18, 64), 'sweeper.resource.Resource', 'Resource', ({(18, 19, 18, 32): 'config_object', (18, 34, 18, 38): 'name', (18, 40, 18, 51): '"""localhost"""', (18, 53, 18, 57): 'None', (18, 59, 18, 63): 'None'}, {}), "(config_object, name, 'localhost', None, None)", False, 'from sweeper.resource import Resource\n'), ((27, 24, 27, 35), 'os.getcwd', 'os.getcwd', ({}, {}), '()', False, 'import os\n')]