def create_cloudmesh_yaml(filename): if not os.path.exists(filename): path = os.path.dirname(filename) if not os.path.isdir(path): Shell.mkdir(path) etc_path = os.path.dirname(cloudmesh_client.__file__) etc_file = os.path.join(etc_path, "etc", "cloudmesh.yaml") to_dir = path_expand("~/.cloudmesh") shutil.copy(etc_file, to_dir) Console.ok("~/.cloudmesh/cloudmesh.yaml created")
def create_cloudmesh_yaml(filename): if not os.path.exists(filename): path = os.path.dirname(filename) if not os.path.isdir(path): Shell.mkdir(path) etc_path = os.path.dirname(cloudmesh_client.__file__) etc_file = os.path.join(etc_path, "etc", "cloudmesh.yaml") to_dir = path_expand("~/.cloudmesh") shutil.copy(etc_file, to_dir) os.system("chmod -R go-rwx " + path_expand("~/.cloudmesh")) Console.ok("~/.cloudmesh/cloudmesh.yaml created")
def config_dir_setup(filename): path = os.path.dirname(filename) if not os.path.isdir(path): Shell.mkdir(path)