Xc@sddlZddlZddlZddlmZdZdZdZdZdZ dZ d Z d Z d Z ed ZdS( iN(tEMPTYcCsi}|jd}x}|D]u}|jr|jjd}t|dkrv|dj||djsscsixth element of network interface definition "{0}" must refer to security groups by IDs, not namestSecurityGroupIdiRRsOseventh element of network interface definition "{0}" must be "true" or "false"iisZeighth and ninth elements of network interface definition "{0}" must not both be non-emptytSecondaryPrivateIpAddressCountsGeighth element of network interface definition "{0}" must be an integerN(struesfalse( RRRRRR!R"R R#Rt setdefaulttalltextend(t iface_as_strR tifacetbittgroupstaddrtsec_ips((s?/usr/lib/python2.7/site-packages/euca2ools/commands/argtypes.pyt vpc_interfaces  )       ,      0cCs<|dkrtjjSt|}|jSWdQXdS(Nt-(tsyststdintreadtopen(tfilenametarg_file((s?/usr/lib/python2.7/site-packages/euca2ools/commands/argtypes.pyt file_contentss  cCsN|dkr"tjtjjSt|}tj|jSWdQXdS(NRT(tbase64t b64encodeRURVRWRX(RYRZ((s?/usr/lib/python2.7/site-packages/euca2ools/commands/argtypes.pytb64encoded_file_contentss cCs|stdnld|kro|jdd\}}|sWtdj|ni|d6|pjtd6Si|d6td6SdS(s Parse a tag definition from the command line. Return a dict that depends on the format of the string given: - 'key=value': {'Key': key, 'Value': value} - 'key=': {'Key': key, 'Value': EMPTY} - 'key': {'Key': key, 'Value': EMPTY} stag must be non-emptyRistag "{0}" must include a keytKeytValueN(RRRR(ttag_strtkeytval((s?/usr/lib/python2.7/site-packages/euca2ools/commands/argtypes.pytbinary_tag_defs  cCsKd|kr<|jdd\}}i|d6|p7td6Si|d6SdS(s Parse a tag definition from the command line. Return a dict that depends on the format of the string given: - 'key=value': {'Key': key, 'Value': value} - 'key=': {'Key': key, 'Value': EMPTY} - 'key': {'Key': key} RiR_R`N(RR(RaRbRc((s?/usr/lib/python2.7/site-packages/euca2ools/commands/argtypes.pytternary_tag_def s cs+fd}djj|_|S(Ncsmt|tret|dkreg|jD]0}t|jdkr1|j^q1SgSdS(Ni(t isinstancetstrRRR(t list_as_strtitem(t delimitert item_type(s?/usr/lib/python2.7/site-packages/euca2ools/commands/argtypes.pyt_delimited_lists!As{0} list(Rt__name__(RjRkRl((RjRks?/usr/lib/python2.7/site-packages/euca2ools/commands/argtypes.pytdelimited_lists(RR\RUtrequestbuilderRRR)R5R>RSR[R^RdReRgRn(((s?/usr/lib/python2.7/site-packages/euca2ools/commands/argtypes.pyts     A d