Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
ó ƒjbc@s“ddlZddlZddlZddlZddlmZddlmZddlm Z ddl m Z m Z ej eƒZdZdZejdƒd „Zd „Zd d „Zddddd „Zdd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zdd„Z d„Z!d„Z"dd„Z#dd„Z$dd„Z%d„Z&d„Z'd„Z(d„Z)d „Z*d!„Z+d"„Z,d#„Z-d$e.fd%„ƒYZ/d&„Z0dd'„Z1ddd(„Z2d)„Z3e4d*„Z5e4e4d+„Z6e7d,„Z8e4d-„Z9e4e4dd.„Z:d/„Z;d0„Z<d1„Z=d2„Z>d3„Z?d4„Z@d5eAfd6„ƒYZBd7eCfd8„ƒYZDdS(9iÿÿÿÿN(tpartial(tmask_to_net_prefix(tutil(tUrlErrortreadurls/sys/class/net/teth0s([0-9]+)cCsAgtj||ƒD]*}|jƒr1t|ƒn |jƒ^qS(sDSorting for Humans: natural sort order. Can be use as the key to sort functions. This will sort ['eth0', 'ens3', 'ens10', 'ens12', 'ens8', 'ens0'] as ['ens0', 'ens3', 'ens8', 'ens10', 'ens12', 'eth0'] instead of the simple python way which will produce ['ens0', 'ens10', 'ens12', 'ens3', 'ens8', 'eth0'].(tretsplittisdigittinttlower(tst_nsrettext((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytnatural_sort_keyscCstS(s3Simple function to return the global SYS_CLASS_NET.(t SYS_CLASS_NET(((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytget_sys_class_path"stcCstƒ|d|S(Nt/(R(tdevnametpath((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt sys_dev_path'sc Cst||ƒ}ytj|ƒ}WnŠttfk r®}t|ddƒ} | tjtj fkr}|dk r}||ƒSn| tj fkr¨|dk r¨||ƒSn‚nX|j ƒ}|dkrË|Sy ||SWn?t k r}|dk rÿ||ƒSt jd||ƒ‚nXdS(Nterrnos5Found unexpected (not translatable) value '%s' in '%s(RRt load_filetOSErrortIOErrortgetattrtNoneRtENOENTtENOTDIRtEINVALtstriptKeyErrortLOGtdebug( RRt translatet on_enoentt on_keyerrort on_einvaltdev_pathtcontentstete_errno((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt read_sys_net+s.           c Cs.d„}t||d|d|d|d|ƒS(NcSstS(N(tFalse(R)((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt on_excp_falseIsR%R$R&R#(R+(tifacetfieldR#R-((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytread_sys_net_safeHs   cCsFt||ƒ}|tkrdSyt|ƒSWntk rAdSXdS(N(R0R,RR t ValueError(R.R/tval((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytread_sys_net_intRs  cCs.itd6td6td6}t|dd|ƒS(Ntuptunknowntdownt operstateR#(tTrueR,R0(RR#((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytis_up\scCstjjt|dƒƒS(Ntwireless(tosRtexistsR(R((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt is_wirelessdscCstjjt|dƒƒS(Ntbridge(R;RR<R(R((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt is_bridgehscCstjjt|dƒƒS(Ntbonding(R;RR<R(R((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytis_bondlscCs,t|ddƒ}tjj|ƒr(|SdS(s8Return the master path for devname, or None if no masterRtmasterN(RR;RR<R(RR((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt get_masterpscCsht|ƒ}|dkrtStjj|dƒ}tjj|dƒ}tjj|ƒpgtjj|ƒS(s@Return a bool indicating if devname's master is a bridge or bondR@R>N(RCRR,R;RtjoinR<(Rt master_patht bonding_patht bridge_path((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytmaster_is_bridge_or_bondxs   cCsA|dkrt|ƒ}nt||ƒs9t||ƒr=tStS(s· netfailover driver uses 3 nics, master, primary and standby. this returns True if the device is either the primary or standby as these devices are to be ignored. N(Rt device_drivertis_netfail_primarytis_netfail_standbyR8R,(Rtdriver((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytis_netfailover‚s   cCs1d}yt|dƒ}Wntk r,nX|S(sE Returns a str from reading /sys/class/net//device/features.Rsdevice/features(R+t Exception(Rtfeatures((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytget_dev_features�s  cCs7t|ƒ}| s%t|ƒdkr)tS|ddkS(sÅ Return True if VIRTIO_NET_F_STANDBY bit (62) is set. https://github.com/torvalds/linux/blob/ 089cf7f6ecb266b6a4164919a2e69bd2f938374a/ include/uapi/linux/virtio_net.h#L60 i@i>t1(RPtlenR,(RRO((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pythas_netfail_standby_feature™s cCsUt|ƒdk rtS|dkr1t|ƒ}n|dkrAtSt|ƒsQtStS(s A device is a "netfail master" device if: - The device does NOT have the 'master' sysfs attribute - The device driver is 'virtio_net' - The device has the standby feature bit set Return True if all of the above is True. t virtio_netN(RCRR,RIRSR8(RRL((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytis_netfail_master¦s    cCs§t|ddƒ}tjj|ƒs(tS|dkrCt|ƒ}n|dkrStStjjtjj|ƒƒ}t|ƒ}|dkr�tSt |ƒ}|s£tSt S(sL A device is a "netfail primary" device if: - the device has a 'master' sysfs file - the device driver is not 'virtio_net' - the 'master' sysfs file points to device with virtio_net driver - the 'master' device has the 'standby' feature bit set Return True if all of the above is True. RRBRTN( RR;RR<R,RRItbasenametrealpathRSR8(RRLtmaster_sysfs_pathtmaster_devnamet master_drivertmaster_has_standby((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyRJ¾s      cCsUt|ƒdkrtS|dkr1t|ƒ}n|dkrAtSt|ƒsQtStS(sø A device is a "netfail standby" device if: - The device has a 'master' sysfs attribute - The device driver is 'virtio_net' - The device has the standby feature bit set Return True if all of the above is True. RTN(RCRR,RIRSR8(RRL((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyRKßs    cCs)t|dƒ}|r%|dkr%tStS(s’ /* interface name assignment types (sysfs name_assign_type attribute) */ #define NET_NAME_UNKNOWN 0 /* unknown origin (not exposed to user) */ #define NET_NAME_ENUM 1 /* enumerated by kernel */ #define NET_NAME_PREDICTABLE 2 /* predictably named by the kernel */ #define NET_NAME_USER 3 /* provided by user-space */ #define NET_NAME_RENAMED 4 /* renamed by user-space */ tname_assign_typet3t4(R]R^(R0R8R,(RR\((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt is_renamed÷s cCs%tt|dƒƒ}d|jƒkS(Ntuevents DEVTYPE=vlan(tstrR0t splitlines(RR`((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytis_vlanscCs`t|dƒ}|dkrtSt|ƒs/tStjd|ƒt|dditd6td6ƒS(Ntiflinkt2s/'%s' is wireless, basing 'connected' on carriertcarrierR#t0RQ(R0R8R=R,R!R"(RRd((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt is_connected s   cCstjjt|dƒƒS(Ntdevice(R;RR<R(R((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt is_physicalscCstjjt|ƒƒS(N(R;RR<R(R((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt is_presentscCsId}t|dƒ}tjj|ƒrEtjjtj|ƒƒ}n|S(s8Return the device driver for net device named 'devname'.s device/driverN(RRR;RtislinkRVtreadlink(RRLt driver_path((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyRI!s cCs#t|dƒ}|tkrdS|S(s;Return the device id string for net device named 'devname'.s device/deviceN(R0R,R(Rtdev_id((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt device_devid,s cCsNytjtƒƒ}Wn1tk rI}|jtjkrCg}qJ‚nX|S(N(R;tlistdirRRRR(tdevsR)((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytget_devicelist5s t ParserErrorcBseZdZRS(s6Raised when a parser has issue parsing a file/content.(t__name__t __module__t__doc__(((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyRt@scCs.| st|tƒ rtS|jdƒdkS(Ntconfigtdisabled(t isinstancetdictR,tget(tcfg((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytis_disabled_cfgDscCs`|sg}ndtjƒkr1tjdƒnvgtƒD]%}|dkr;t|ƒ r;|^q;}t|ƒr§tjd|ƒd}tjtj|dtjƒnt dgƒ}t gtƒD]}t |ƒ|krÃ|^qÃ}|j |ƒ}g}g}x×|D]Ï}|j dƒr'q nt |ƒr9q nt|ƒrKq nt|ƒr]q nt|dƒ} | r…|j|ƒq nt|d ƒ} | r­|j|ƒq nt|d ƒ} | dkr |j|ƒq q q W|rî|}n|}tt|dtƒƒ} t| kr8| jtƒ| jdtƒnx!| D]} t| dƒr?| Sq?WdS(s1Return the name of the 'fallback' network device.s net.ifnames=0s9Stable ifnames disabled by net.ifnames=0 in /proc/cmdlinetlos4Found unstable nic names: %s; calling udevadm settles!Waiting for udev events to settletfunctvethRftdormantR7R6tlowerlayerdownR5tkeyitaddress(sdormantsdownRƒsunknownN(Rt get_cmdlineR!R"RsR_RRtlog_timetudevadm_settletsetRIt differencet startswithR?RARMR3tappendR0tlisttsortedRtDEFAULT_PRIMARY_INTERFACEtremovetinsertR(tblacklist_driversRitunstabletmsgtinvalid_interfacestpotential_interfacest connectedtpossibly_connectedt interfaceRfR‚R7tnamestname((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytfind_fallback_nicJsd %                cCsÆ|st}ntd|ƒ}|s(d St|ƒrDi|d6}nit|dƒjƒd6}itd6|d6|d6}|r§t|ƒ}|r§||ddytt|ƒƒWn#tk r9}td|ƒ‚nXdS(s·read the network config and rename devices accordingly. if strict_present is false, then do not raise exception if no devices match. if strict_busy is false, then do not raise exception if the device cannot be renamed because it is currently configured. renames are only attempted for interfaces of type 'physical'. It is expected that the network system will create other devices with the correct name in place.s(Failed to apply network config names: %sN(t_rename_interfacesR³R²(R«tstrict_presentt strict_busyR)((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytapply_network_config_namess cCs>t|dƒ}|dkr4|r0tdƒ‚ntS|dkS(sœreturn True if the provided interface has its own address. Based on addr_assign_type in /sys. Return true for any interface that does not have a 'stolen' address. Examples of such devices are bonds or vlans that inherit their mac from another device. Possible values are: 0: permanent address 2: stolen from another device 1: randomly generated 3: set using dev_set_mac_addresstaddr_assign_types%s had no addr_assign_type.iiiN(iii(R3RR1R8(tifnameR¹t assign_type((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytinterface_has_own_macs  c CsJi}x]tƒD]R\}}}}idd6|d6|d6|jƒd6|d6t|ƒd6||fs(R{R°(tbymac(RØ(s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt update_bynamees cSs)tjddd|d|gdtƒdS(NRËtlinkR‰R›RÑ(RRÔR8(tcurtnew((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytrenameiscSs&tjddd|dgdtƒdS(NRËRåR‰R6RÑ(RRÔR8(R›((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyR6lscSs&tjddd|dgdtƒdS(NRËRåR‰R4RÑ(RRÔR8(R›((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyR4oss cirename%diÿÿÿÿcSs‚|r@|r@|r@|d|ko?|d|ko?|d|kS|rj|rj|d|koi|d|kS|r~|d|kStS(smatch if set and in dataR®RLRª(R,(RâR®RLRª((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt entry_matchys csƒgˆjƒD]!}ˆ||||ƒr |^q }t|ƒrt|ƒdkrwd||||f}t|ƒ‚n|dSdS(NisjFailed to match a single device. Matched devices "%s" with search values "(mac:%s driver:%s device_id:%s)"i(R°RRR1R(R®RLRªRâRŸR”(RØRé(s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt find_entry‡s! s<[nic not present] Cannot rename mac=%s to %s, not available.R4s*[busy] Error renaming mac=%s from %s to %sRÊR6s2[busy-target] Error renaming mac=%s from %s to %s.iRèis(unable to do any work for renaming of %ss$no work necessary for renaming of %ss$achieving renaming of %s with ops %ss.[unknown] Error performing %s%s for %s, %s: %ss ( RRR!R"RRàtitemstcopyR|R RŒR,RNRD(trenamesRÃRÄt current_infoR›RâRæRäRèR6R4topsterrorstupst cur_bynamet tmpname_fmtttmpiRêR®tnew_nameRLRªtcur_opstcur_nameR”ttargetttmp_nametopmaptopR©R)((RØRés:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyRÂSs´                        "#    cCs7d}tjjt|dƒƒr*d}nt||ƒS(s6Returns the string value of an interface's MAC AddressR…t bonding_slavesbonding_slave/perm_hwaddr(R;RtisdirRR0(RÇR((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytget_interface_macçs cCsMt|dƒdkrIt|ƒ}|rE|rE|dd!|d}n|SdS(s½Returns the string value of an Infiniband interface's hardware address. If ethernet_format is True, an Ethernet MAC-style 6 byte representation of the address will be returned. R¦t32i$iòÿÿÿi3N(R0Rþ(RÇtethernet_formatR®((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytget_ib_interface_hwaddrñs   cCs®i}x¡tƒD]–\}}}}||krNtd||||fƒ‚n|||Perform ephemeral network setup if interface is not connected.s=Skip ephemeral network setup, instance has connectivity to %sN( RR R!R"t_bringup_deviceRt_bringup_static_routesRt_bringup_router(R((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt __enter__�s     cCs+x$|jD]}tj|dtƒq WdS(sTeardown anything we set up.RÑN(RRRÔR8(Rt excp_typet excp_valuetexcp_tracebacktcmd((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt__exit__œsc Cs<tjdddddd||fd|jgdtƒd S( s7Perform the ip command to remove the specified address.RËs-familytinetRÌtdels%s/%stdevRÑN(RRÔR™R8(RR…R((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyt_delete_address¡sc CsKdj|j|jƒ}tjd|j||jƒyHtjddddd|d|jd |jg d t d id d 6ƒWnDtj k rÂ}d|j kr¦‚ntjd|j|jƒn…Xtjdddddd |jdgd t ƒ|j j dddddd |jdgƒ|j j ddddd|d |jgƒdS(s1Perform the ip comands to fully setup the device.s{0}/{1}s:Attempting setup of ephemeral network on %s with %s brd %sRËs-familyR#RÌtaddRR%RÑt update_envtCtLANGs File existss7Skip ephemeral network setup, %s already has address %sRåR‰R4R6R$N(RRËRR!R"R™RRRÔR8tProcessExecutionErrortstderrRRŒ(RtcidrR)((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyR¨s0   cCs¥xž|jD]“\}}g}|dkr7d|g}ntjdddd|g|d|jgdtƒ|jjd dddd |g|d|jgƒq WdS( Ns 0.0.0.0/0tviaRËs-4trouteRŒR%RÑiR$(RRRÔR™R8RR‘(Rt net_addresstgatewaytvia_arg((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyRÅs  c Cs$tjddddgdtƒ\}}d|krStjd|j|jƒƒdStjdd dd |jd |jd |jg dtƒ|j j d dd dd|jd |jd |jg ƒtjdd dd dd|jd |jg dtƒ|j j d dd dddd |jgƒdS(s<Perform the ip commands to fully setup the router if needed.RËR/RÍs 0.0.0.0/0RÑtdefaults<Skip ephemeral route setup. %s already has default route: %sNs-4R'R%tsrciR$R.( RRÔR8R!R"R™RRRËRR‘(RtoutR½((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyRÓs$'   N( RuRvRwRRRR"R&RRR(((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyRVs      tRendererNotFoundErrorcBseZRS((RuRv(((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pyR6ês(ERtloggingR;Rt functoolsRtcloudinit.net.network_stateRt cloudinitRtcloudinit.url_helperRRt getLoggerRuR!RR�RÓRRRRR+R0R3R9R=R?RARCRHRMRPRSRURJRKR_RcRhRjRkRIRpRsRNRtR~RœR¥R³R8RÁRÅR,RÉRàRÂRþRRµRÒR R tobjectRR²R6(((s:/usr/lib/python2.7/site-packages/cloudinit/net/__init__.pytsr              !         K 1 %  + “    ”