5
from maas_api_helper import (
11
MD_VERSION = "2012-03-01"
15
"""Authenticate, and download file from MAAS metadata API."""
18
parser = argparse.ArgumentParser(
19
description="GET file from MAAS metadata API.")
21
"--config", metavar="file",
22
help="Config file containing MAAS API credentials", default=None)
23
parser.add_argument("--apiver", metavar="version",
24
help="Use given API version", default=MD_VERSION)
25
parser.add_argument('path')
27
args = parser.parse_args()
33
'consumer_secret': '',
36
read_config(args.config, creds)
38
creds['metadata_url'],
43
sys.stdout.write(geturl(url, creds))
45
if __name__ == '__main__':