/usr/lib/python2.6/site-packages/openstackclient/network/v2
NameSizeModeActions
floating_ip.py66350644editdlrm
floating_ip.pyc79550644editdlrm
network.py94830644editdlrm
network.pyc97130644editdlrm
port.py151870644editdlrm
port.pyc132940644editdlrm
router.py136330644editdlrm
router.pyc144380644editdlrm
security_group.py109700644editdlrm
security_group.pyc117610644editdlrm
security_group_rule.py146510644editdlrm
security_group_rule.pyc133850644editdlrm
subnet.py145280644editdlrm
subnet.pyc139880644editdlrm
subnet_pool.py90020644editdlrm
subnet_pool.pyc95950644editdlrm
__init__.py00644editdlrm
__init__.pyc1700644editdlrm
Edit: /usr/lib/python2.6/site-packages/openstackclient/network/v2/subnet.pyc (13988B)
Ñò þWc @scdZddkZddklZddklZddklZddklZddklZddk l Z dd k l Z d „Zd „Zhed 6eid 6ed6Zd„Zd„Zd„Zd„Zed„Zdeifd„ƒYZdeifd„ƒYZdeifd„ƒYZdeifd„ƒYZdeifd„ƒYZdS(sSubnet action implementationsiÿÿÿÿN(t JSONEncoder(tcommand(t exceptions(t parseractions(tutils(t_(tcommoncCsPg}|D]/}|d|iddƒ|iddƒfq ~}di|ƒS(Ns%s-%ststartttendt,(tgettjoin(tdatat_[1]tpooltpool_formatted((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyt_format_allocation_poolss<c CsYy8dig}|D]}|tƒi|ƒq~ƒSWnttfj odSXdS(Ns R(R Rtencodet TypeErrortKeyError(R Rtroute((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyt_format_host_routes!s8tallocation_poolstdns_nameserverst host_routesc Cs£|iddddddtiddd gd td ƒƒ|id dd ddddd tdƒƒ|iddddddtidddgd tdƒƒdS(Ns--allocation-pooltmetavars#start=,end=tdestRtactiont required_keysRR thelps‡Allocation pool IP addresses for this subnet e.g.: start=192.168.199.2,end=192.168.199.254 (repeat option to add multiple IP addresses)s--dns-nameserverstappendRsFDNS server for this subnet (repeat option to set multiple DNS servers)s --host-routes)destination=,gateway=Rt destinationtgatewaysÌAdditional route for this subnet e.g.: destination=10.10.0.0/16,gateway=192.168.71.254 destination: destination subnet (in CIDR notation) gateway: nexthop IP address (repeat option to add multiple routes)(t add_argumentRtMultiKeyValueActionR(tparser((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyt_get_common_parse_arguments/s(      cCsMt|iƒƒ}d|jo|idƒ|idƒntt|ƒƒS(Nt tenant_idt project_id(tlisttkeystremoveRttupletsorted(titemtcolumns((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyt _get_columnsPs   cCs9ti|ƒ}x#|D]}|d|d<|d=qW|S(NR!tnexthop(tcopytdeepcopy(tentriestchanged_entriestentry((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pytconvert_entries_to_nexthopXs  cCs9ti|ƒ}x#|D]}|d|d<|d=qW|S(NR0R!(R1R2(R3R4R5((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pytconvert_entries_to_gatewaybs  c Csh}d|jo'|idj ot|iƒ|d or nonetnonet gateway_ipRt enable_dhcpRR(R8tNonetstrR9tidentitytidentity_commont find_projecttproject_domaintidtnetworkt find_networktFalset subnet_pooltfind_subnet_pooltuse_default_subnet_pooltTruet prefix_lengtht subnet_rangeR@RARBR!tlowerRt CommandErrorRtdhcptno_dhcpRRR6( tclient_managert parsed_argst is_createtattrstidentity_clientR'tclientRQR!((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyt _get_attrslsh          t CreateSubnetcBs eZdZd„Zd„ZRS(sCreate a subnetc Cstt|ƒi|ƒ}|iddtdƒƒ|iddddtdƒƒti|ƒ|iƒ}|iddd dtd ƒƒ|id d d dtdƒƒ|iddddtdƒƒ|iddddtdƒƒ|iƒ}|idd d dtdtdƒƒ|idd d dtdƒƒ|iddddddtdƒƒ|iddt dd d!d d"gdtd#ƒƒ|id$d!d%d&d'gdtd(ƒƒ|id)d!d%d&d'gdtd*ƒƒ|id+d,tdd-dtd.ƒƒt |ƒ|S(/NR8RsNew subnet names --projectRs sOwner's project (name or ID)s --subnet-pools sBSubnet pool from which this subnet will obtain a CIDR (Name or ID)s--use-default-subnet-poolRt store_trues(Use default subnet pool for --ip-versions--prefix-lengthss4Prefix length for subnet allocation from subnet pools--subnet-rangess^Subnet range in CIDR notation (required if --subnet-pool is not specified, optional otherwise)s--dhcptdefaultsEnable DHCP (default)s --no-dhcps Disable DHCPs --gateways RCsDSpecify a gateway for the subnet. The three options are: : Specific IP address to use as the gateway, 'auto': Gateway address should automatically be chosen from within the subnet itself, 'none': This subnet will not use a gateway, e.g.: --gateway 192.168.9.1, --gateway auto, --gateway none (default is 'auto')s --ip-versionttypeitchoicesisIP version (default is 4). Note that when subnet pool is specified, IP version is determined from the subnet pool and this option is ignoreds--ipv6-ra-modesdhcpv6-statefulsdhcpv6-statelesstslaacs\IPv6 RA (Router Advertisement) mode, valid modes: [dhcpv6-stateful, dhcpv6-stateless, slaac]s--ipv6-address-modesJIPv6 address mode, valid modes: [dhcpv6-stateful, dhcpv6-stateless, slaac]s --networktrequireds s+Network this subnet belongs to (name or ID)( tsuperRbt get_parserR"RRJt#add_project_domain_option_to_parsertadd_mutually_exclusive_groupRTtintR%(tselft prog_nameR$tsubnet_pool_grouptdhcp_enable_group((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyRj®s|                  cCsa|iii}t|ii|ƒ}|i|}t|ƒ}ti||dtƒ}||fS(Nt formatters( tappR[RNRat create_subnetR/Rtget_item_propertiest _formatters(RnR\R`R^tobjR.R ((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyt take_actions  (t__name__t __module__t__doc__RjRx(((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyRb«s Yt DeleteSubnetcBs eZdZd„Zd„ZRS(s Delete subnetcCs;tt|ƒi|ƒ}|iddddtdƒƒ|S(NtsubnetRsRsSubnet to delete (name or ID)(RiR|RjR"R(RnRoR$((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyRjs  cCs,|iii}|i|i|iƒƒdS(N(RsR[RNt delete_subnett find_subnetR}(RnR\R`((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyRxs(RyRzR{RjRx(((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyR|s t ListSubnetcBs eZdZd„Zd„ZRS(s List subnetsc CsAtt|ƒi|ƒ}|iddddtdtdƒƒ|S(Ns--longRRcRdRs List additional fields in output(RiR€RjR"RPR(RnRoR$((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyRj%s cs]|iiiiƒ}d}d‰|io|d7}ˆd7‰n|‡fd†|DƒfS(NtIDtNametNetworktSubnetRMR8R;R?tProjecttDHCPs Name ServerssAllocation Poolss Host Routess IP VersiontGatewayR&RFRRRR@REc3s+x$|]}ti|ˆdtƒVqWdS(RrN(RRuRv(t.0ts(R.(sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pys =s (RsNameRƒR„(sidsnames network_idscidr(R…R†s Name ServerssAllocation Poolss Host Routess IP VersionR‡(s tenant_ids enable_dhcpsdns_nameserverssallocation_poolss host_routess ip_versions gateway_ip(RsR[RNtsubnetstlong(RnR\R theaders((R.sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyRx/s   (RyRzR{RjRx(((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyR€"s t SetSubnetcBs eZdZd„Zd„ZRS(sSet subnet propertiesc CsÓtt|ƒi|ƒ}|iddddtdƒƒ|iddddtdƒƒ|iƒ}|id d d d ddtd ƒƒ|idd d dtdƒƒ|iddddtdƒƒt|ƒ|S(NR}RsRsSubnet to modify (name or ID)s--namessUpdated name of the subnets--dhcpRRcRds Enable DHCPs --no-dhcps Disable DHCPs --gateways sÃSpecify a gateway for the subnet. The options are: : Specific IP address to use as the gateway, 'none': This subnet will not use a gateway, e.g.: --gateway 192.168.9.1, --gateway none(RiRRjR"RRlRGR%(RnRoR$Rq((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyRjFs2       cCsâ|iii}|i|idtƒ}t|ii|dtƒ}|pd}ti|ƒ‚nd|jo|dc|i 7RsSubnet to display (name or ID)(RiRRjR"R(RnRoR$((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyRj~s  cCsO|iiii|idtƒ}t|ƒ}ti||dt ƒ}||fS(NR:Rr( RsR[RNRR}RPR/RRuRv(RnR\RwR.R ((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyRx‡s   (RyRzR{RjRx(((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyR{s ( R{R1t json.encoderRtopenstackclient.commonRRRRtopenstackclient.i18nRtopenstackclient.identityRRJRRt format_listRvR%R/R6R7RTRatShowOneRbtCommandR|tListerR€RR(((sQ/tmp/pip-build-iUCeBS/python-openstackclient/openstackclient/network/v2/subnet.pyts0      !  ?e!8