ó oBú]c@s—dZddlZddlZddlZddlmZmZmZdeZdZ dd„Z d„Z d„Z d „Zed kr“eƒndS( sCCommandline utility to list the canonical cloud-id for an instance.iÿÿÿÿN(tINSTANCE_JSON_FILEtMETADATA_UNKNOWNtcanonical_cloud_ids/run/cloud-init/%sscloud-idc Cs|s!tjdtddƒ}n|jdddddtd d ƒ|jd d dddtd d ƒ|jdddtdtd dtƒ|S(s*Build or extend an arg parser for the cloud-id utility. @param parser: Optional existing ArgumentParser instance representing the query subcommand which will be extended to support the args of this utility. @returns: ArgumentParser with proper argument configuration. tprogt descriptions/Report the canonical cloud-id for this instances-js--jsontactiont store_truetdefaultthelps5Report all standardized cloud-id information as json.s-ls--longs=Report extended cloud-id information as tab-delimited string.s-is--instance-datattypes.Path to instance-data.json file. Default is %s(targparsetArgumentParsertNAMEt add_argumenttFalsetstrtDEFAULT_INSTANCE_JSON(tparser((s:/usr/lib/python2.7/site-packages/cloudinit/cmd/cloud_id.pyt get_parsers   cCstjjd|ƒdS(Ns ERROR: %s i(tsyststderrtwrite(tmsg((s:/usr/lib/python2.7/site-packages/cloudinit/cmd/cloud_id.pyterror+sc Cs)ytjt|jƒƒ}WnEtk r=td|jƒStk rc}td|j|fƒSX|jdiƒ}t|jdt ƒ|jdt ƒ|jdt ƒƒ}|jrã||ds       !