/usr/lib/python2.6/site-packages/cloudinit/config
NameSizeModeActions
cc_apt_configure.py96000644editdlrm
cc_apt_configure.pyc90130644editdlrm
cc_apt_configure.pyo90130644editdlrm
cc_apt_pipelining.py21110644editdlrm
cc_apt_pipelining.pyc16430644editdlrm
cc_apt_pipelining.pyo16430644editdlrm
cc_bootcmd.py17820644editdlrm
cc_bootcmd.pyc12950644editdlrm
cc_bootcmd.pyo12950644editdlrm
cc_byobu.py28860644editdlrm
cc_byobu.pyc21850644editdlrm
cc_byobu.pyo21850644editdlrm
cc_ca_certs.py38720644editdlrm
cc_ca_certs.pyc33960644editdlrm
cc_ca_certs.pyo33960644editdlrm
cc_chef.py57180644editdlrm
cc_chef.pyc40270644editdlrm
cc_chef.pyo40270644editdlrm
cc_debug.py28690644editdlrm
cc_debug.pyc24440644editdlrm
cc_debug.pyo24440644editdlrm
cc_disable_ec2_metadata.py13120644editdlrm
cc_disable_ec2_metadata.pyc8730644editdlrm
cc_disable_ec2_metadata.pyo8730644editdlrm
cc_disk_setup.py252740644editdlrm
cc_disk_setup.pyc225600644editdlrm
cc_disk_setup.pyo225600644editdlrm
cc_emit_upstart.py17070644editdlrm
cc_emit_upstart.pyc11430644editdlrm
cc_emit_upstart.pyo11430644editdlrm
cc_final_message.py23480644editdlrm
cc_final_message.pyc18600644editdlrm
cc_final_message.pyo18600644editdlrm
cc_foo.py24530644editdlrm
cc_foo.pyc4880644editdlrm
cc_foo.pyo4880644editdlrm
cc_growpart.py96020644editdlrm
cc_growpart.pyc89280644editdlrm
cc_growpart.pyo89280644editdlrm
cc_grub_dpkg.py23440644editdlrm
cc_grub_dpkg.pyc15430644editdlrm
cc_grub_dpkg.pyo15430644editdlrm
cc_keys_to_console.py19430644editdlrm
cc_keys_to_console.pyc13000644editdlrm
cc_keys_to_console.pyo13000644editdlrm
cc_landscape.py29910644editdlrm
cc_landscape.pyc24760644editdlrm
cc_landscape.pyo24760644editdlrm
cc_locale.py13580644editdlrm
cc_locale.pyc8010644editdlrm
cc_locale.pyo8010644editdlrm
cc_mcollective.py37600644editdlrm
cc_mcollective.pyc18400644editdlrm
cc_mcollective.pyo18400644editdlrm
cc_migrator.py31190644editdlrm
cc_migrator.pyc27490644editdlrm
cc_migrator.pyo27490644editdlrm
cc_mounts.py84830644editdlrm
cc_mounts.pyc61530644editdlrm
cc_mounts.pyo61530644editdlrm
cc_package_update_upgrade_install.py35230644editdlrm
cc_package_update_upgrade_install.pyc29370644editdlrm
cc_package_update_upgrade_install.pyo29370644editdlrm
cc_phone_home.py36660644editdlrm
cc_phone_home.pyc24790644editdlrm
cc_phone_home.pyo24790644editdlrm
cc_power_state_change.py51210644editdlrm
cc_power_state_change.pyc49340644editdlrm
cc_power_state_change.pyo49340644editdlrm
cc_puppet.py51660644editdlrm
cc_puppet.pyc30550644editdlrm
cc_puppet.pyo30550644editdlrm
cc_resizefs.py56970644editdlrm
cc_resizefs.pyc47680644editdlrm
cc_resizefs.pyo47680644editdlrm
cc_resolv_conf.py36810644editdlrm
cc_resolv_conf.pyc22130644editdlrm
cc_resolv_conf.pyo22130644editdlrm
cc_rightscale_userdata.py35750644editdlrm
cc_rightscale_userdata.pyc20740644editdlrm
cc_rightscale_userdata.pyo20740644editdlrm
cc_rsyslog.py34120644editdlrm
cc_rsyslog.pyc18480644editdlrm
cc_rsyslog.pyo18480644editdlrm
cc_runcmd.py13480644editdlrm
cc_runcmd.pyc8420644editdlrm
cc_runcmd.pyo8420644editdlrm
cc_salt_minion.py23150644editdlrm
cc_salt_minion.pyc14130644editdlrm
cc_salt_minion.pyo14130644editdlrm
cc_scripts_per_boot.py13690644editdlrm
cc_scripts_per_boot.pyc8060644editdlrm
cc_scripts_per_boot.pyo8060644editdlrm
cc_scripts_per_instance.py13770644editdlrm
cc_scripts_per_instance.pyc8200644editdlrm
cc_scripts_per_instance.pyo8200644editdlrm
cc_scripts_per_once.py13650644editdlrm
cc_scripts_per_once.pyc8040644editdlrm
cc_scripts_per_once.pyo8040644editdlrm
cc_scripts_user.py13880644editdlrm
cc_scripts_user.pyc7880644editdlrm
cc_scripts_user.pyo7880644editdlrm
cc_scripts_vendor.py13980644editdlrm
cc_scripts_vendor.pyc9240644editdlrm
cc_scripts_vendor.pyo9240644editdlrm
cc_seed_random.py31610644editdlrm
cc_seed_random.pyc27670644editdlrm
cc_seed_random.pyo27670644editdlrm
cc_set_hostname.py14600644editdlrm
cc_set_hostname.pyc9320644editdlrm
cc_set_hostname.pyo9320644editdlrm
cc_set_passwords.py55550644editdlrm
cc_set_passwords.pyc40100644editdlrm
cc_set_passwords.pyo40100644editdlrm
cc_ssh.py52250644editdlrm
cc_ssh.pyc41040644editdlrm
cc_ssh.pyo41040644editdlrm
cc_ssh_authkey_fingerprints.py36480644editdlrm
cc_ssh_authkey_fingerprints.pyc35070644editdlrm
cc_ssh_authkey_fingerprints.pyo35070644editdlrm
cc_ssh_import_id.py30390644editdlrm
cc_ssh_import_id.pyc21910644editdlrm
cc_ssh_import_id.pyo21910644editdlrm
cc_timezone.py13160644editdlrm
cc_timezone.pyc7690644editdlrm
cc_timezone.pyo7690644editdlrm
cc_update_etc_hosts.py23910644editdlrm
cc_update_etc_hosts.pyc15090644editdlrm
cc_update_etc_hosts.pyo15090644editdlrm
cc_update_hostname.py16270644editdlrm
cc_update_hostname.pyc11660644editdlrm
cc_update_hostname.pyo11660644editdlrm
cc_users_groups.py12650644editdlrm
cc_users_groups.pyc7920644editdlrm
cc_users_groups.pyo7920644editdlrm
cc_write_files.py35540644editdlrm
cc_write_files.pyc32310644editdlrm
cc_write_files.pyo32310644editdlrm
cc_yum_add_repo.py39440644editdlrm
cc_yum_add_repo.pyc30260644editdlrm
cc_yum_add_repo.pyo30260644editdlrm
__init__.py19700644editdlrm
__init__.pyc13490644editdlrm
__init__.pyo13490644editdlrm
Edit: /usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyc (22560B)
Ñò ¿;Sc @s°ddklZddklZddkZddkZddkZeZeidƒZ eidƒZ eidƒZ eidƒZ eidƒZ eid ƒZeieƒZd „Zd „Zd „Zdd „Zed„Zd„Zed„Zd„Zd„Zdddedd„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$d„Z%d„Z&d„Z'd„Z(d„Z)d„Z*d „Z+d!„Z,d"„Z-dS(#iÿÿÿÿ(t PER_INSTANCE(tutilNtudevadmtsfdisktlsblktblkidtblockdevtwipefsc Csø|idƒ}t|tƒoÛt||iƒ|idt|ƒƒx²|iƒD] \}}t|tƒp|id|ƒqRny@|idƒt i dt idd|dt d ||fƒWqRt j o}t it d |ƒqRXqRWn|id ƒ} t| tƒoÛ|id t| ƒƒt| |iƒx²| D]¦}t|tƒp|id |ƒqFnyL|idƒ|idƒ} t i dt idd| dtd |fƒWqFt j o}t it d|ƒqFXqFWndS(s[ See doc/examples/cloud-config_disk-setup.txt for documentation on the format. t disk_setupsPartitioning disks: %ssInvalid disk definition for %ss!Creating new partition table/disktlogfunctmsgsCreating partition on %stfunctargss Failed partitioning operation %stfs_setupssetting up filesystems: %ss"Invalid file system definition: %ssCreating new filesystem.tdevicesCreating fs for %ss%Failed during filesystem operation %sN(tgett isinstancetdicttupdate_disk_setup_devicestdevice_name_to_devicetdebugtstrtitemstwarnRtlog_timetLOGtmkpartt Exceptiontlogexctlisttupdate_fs_setup_devicestmkfs( t_nametcfgtcloudtlogt_argsRtdiskt definitionteR R((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pythandle&sB   !  cCs©x¢|iƒD]”}||ƒ}|djp ||joq n||jotid||ƒ||=n||||<|||d<||=tid||ƒq WdS(Ns0Replacing %s in disk_setup for translation of %st _orignames,updated disk_setup device entry '%s' to '%s'(tkeystNoneRtinfoR(Rttformertorignamet transformed((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyROs       cCsñxê|D]â}t|tƒptid|ƒqn|idƒ}|djoqnti|ƒ\}}||ƒ}|dj o4|}tid|||ƒ||d<||d: don't enumerate children devices Return a dict describing the disk: type: the entry type, i.e disk or part fstype: the filesystem type, if it exists label: file system label, if it exists name: the device name, i.e. sda s--pairss--outsNAME,TYPE,FSTYPE,LABELs--nodepss"Failed during disk check for %s %sitnamettypetfstypetlabelN( t LSBLK_CMDtappendR+RtsubpRtstript splitlinestlenR8R@tlower( Rtnodepst lsblk_cmdR,t_errR'R<R=tpartsR4tdR>R?((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytenumerate_disk‹s(  J   cCs=x6t|dtƒD]"}d|jo|diƒSqWdS(s@ Return the device type of the device by calling lsblk. RLRBN(RQtTrueRKR+(RRP((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyt device_typeµs  cCsid}yt|ƒ}Wntid|ƒtSX|o|djotS| o|djotStS(s0 Check if the device is a valid device. tsQuery against device %s failedR4R%(RSRRtFalseRR(RAR0td_type((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytis_device_validÀsc Cs&d \}}}}tdd|g}y%ti|dddgƒ\}}Wn+tj o}td||fƒ‚nX|o›t|iƒƒdjo~x{t|ddƒD]c\}} |iƒd jo | }qª|iƒd jo | }qª|iƒd jo | }qªqªWqn|||fS(sÏ Check if the device has a filesystem on it Output of blkid is generally something like: /dev/sda: LABEL="Backup500G" UUID="..." TYPE="ext4" Return values are device, label, type, uuid s-cs /dev/nulltrcsiis"Failed during disk check for %s %siR:RDRBtuuidN(NNNN( R+t BLKID_CMDRRGRRJRIR@RK( RtoutRDtfs_typeRYt blkid_cmdRNR'R>R?((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytcheck_fsÒs" %   cCst|ƒ\}}}|S(s7 Returns true if the device has a file system. (R^(Rt_R\((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyt is_filesystemðscCsW|d jo d}n|pddg}nt}x÷t|ƒD]é}|d|jo |tjod|dtfS|d|jo3|o|d|jp| od|dtfS|d|jo]|ddjp |do t}n|ddjoq*|dpd|dtfSqAqAW|p |tfStid ƒd tfS( s Find a device that is either matches the spec, or the first The return is value is (, ) where the device is the device to use and the bool is whether the device matches the fs_type and label. Note: This works with GPT partition tables! RTR%R4RCs/dev/%sRARDRBs5Failed to find device during available device search.N(R+RURQRRRR(RR\RDt valid_targetst label_matcht replace_fstraw_device_usedRP((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytfind_device_nodeøs.        cCsjg}t|ƒD] }||q~}t|iƒƒdjotSt|ƒ\}}}|otStS(s¥ Check if the device is currently used. Returns true if the device has either a file system or a partition entry is no filesystem found on the disk. i(RQRJRIRRR^RU(RR<R=t use_countR_t check_fstype((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyt is_disk_used)s 'cCsltd|g}d}yti|ƒ\}}Wn+tj o}td||fƒ‚nXt|iƒƒS(sW Returns the hard disk size. This works with any disk type, including GPT. s --show-sizesFailed to get %s size %sN(t SFDISK_CMDR+RRGRtintRH(Rtsize_cmdtsizeRNR'((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyt get_hdd_size>scGs‘t|ƒdjotdƒ‚n|d|d}|d}y(|otƒ||ŒStƒ|SWn#tj otd|ƒ‚nXdS(s- Call the appropriate function. The first value is the template for function name The second value is the template replacement The remain values are passed to the function For example: get_dyn_func("foo_%s", 'bar', 1, 2, 3,) would call "foo_bar" with args of 1, 2, 3 is*Unable to determine dynamic funcation nameiisNo such function %s to call!N(RJRtglobalstKeyError(R t func_namet func_args((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyt get_dyn_funcNs  c Cst|ƒtd|g}y#ti|dd|ƒ\}}Wn+tj o}td||fƒ‚nXg}xÝ|iƒD]Ï}|iƒ}t|ƒdjoq}n||djo’|diƒd joq}nd } xZt t d t|ƒƒd t ƒD]7} || i ƒo || d jo|| } PqqW|i| ƒq}q}Wt|tƒo$|ot|ƒd jot StSt|ƒt|ƒjotSxot d t|ƒd ƒD]T} t|| d tƒo6|| \} } t|| ƒt| ƒjotSq¼q¼Wt StS(sÒ Returns true if the partition layout matches the one on the disk Layout should be a list of values. At this time, this only verifies that the number of partitions and their labels is correct. s-ltdatas%s s(Error running partition command on %s %siiÿÿÿÿtextendedtemptyitreverset/(RtRuN(t read_parttblRiRRGRRIR8RJRKR+tsortedtrangeRRtisdigitRFRtboolRUttupleRj( Rtlayouttprt_cmdR[RNR't found_layouttlinet_linet type_labelR=R_t part_type((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytcheck_partition_mbr_layoutisJ #  ""   cCstd|||ƒS(sÎ See if the partition lay out matches. This is future a future proofing function. In order to add support for other disk layout schemes, add a function called check_partition_%s_layout scheck_partition_%s_layout(Rr(t table_typeRR~((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytcheck_partition_layout¤s c Cs¤t|tƒ ot|tƒodSt|ƒdjot|tƒpt|tƒ otdƒ‚nt|ƒ}|djotdƒ‚ng}d}xÈ|D]À}d}|}|d7}t|tƒo7t|ƒdjotd |ƒ‚n|\}}ntt|ƒt|ƒd d ƒ}||jo|id |ƒq¦|id ||fƒq¦Wdi|ƒ} t|ƒdjotd| ƒ‚n| S(s@ Calculate the layout of the partition table. Partition sizes are defined as percentage values or a tuple of percentage and partition type. For example: [ 33, [66: 82] ] Defines the first partition to be a size of 1/3 the disk, while the remaining 2/3's will be of type Linux Swap. s0,isPartition layout is invalidis$Only simply partitioning is allowed.iSiis%Partition was incorrectly defined: %sidis,,%ss,%s,%ss s-Calculated partition definition is too big %s( RRR|RJRRjtfloatRFtjoin( RlR~t last_part_numtpart_definitiontpart_numR4R„tpercentt part_sizetsfdisk_definition((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytget_partition_mbr_layout°s8 !#   $ cCsŒd}d}d}t|dƒiiƒ}zM|~}|i||ƒ|i| tiƒ|i||ƒ|iƒWdQXt|ƒdS(Ntisrb+ii( topent__exit__t __enter__twritetseektostSEEK_ENDtflushRx(Rtnullt start_lentend_lenR<tfp((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytpurge_disk_ptableäs&cCs¡xt|ƒD]‚}|dd joktdd|dg}y&tid|dƒti|ƒWqtj otd|dƒ‚qXq q Wt|ƒd S( s' Remove parition table entries RBR%tcrypts--alls/dev/%sRAsPurging filesystem on /dev/%ssFailed FS purge of /dev/%sN(sdiskRŸ(RQt WIPEFS_CMDRR,RRGRRž(RRPt wipefs_cmd((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyt purge_diskós !cCstd|||ƒS(sï Call the appropriate function for creating the table definition. Returns the table definition This is a future proofing function. To add support for other layouts, simply add a "get_partition_%s_layout" function. sget_partition_%s_layout(Rr(R†RlR~((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytget_partition_layouts cCsvtd|g}tdg}y+ti|ƒti|ƒti|ƒWn)tj o}titd|ƒnXdS(sr Use partprobe instead of 'udevadm'. Partprobe is the only reliable way to probe the partition table. s --rereadpttsettles%Failed reading the partition table %sN(t BLKDEV_CMDt UDEVADM_CMDRRGRRR(Rt blkdev_cmdtudev_cmdR'((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyRxs   cCsitdd|g}yti|dd|ƒWn+tj o}td||fƒ‚nXt|ƒdS(sV Break out of mbr partition to allow for future partition types, i.e. gpt s--Linuxs-uMRss%s s Failed to partition device %s %sN(RiRRGRRx(RR~RR'((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytexec_mkpart_mbr s cCstd|||ƒS(s Fetches the function for creating the table type. This allows to dynamically find which function to call. Paramaters: table_type: type of partition table to use device: the device to work on layout: layout definition specific to partition table sexec_mkpart_%s(Rr(R†RR~((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyt exec_mkpart/s cCsétid|ƒ|idtƒ}|idtƒ}|iddƒ}tidƒt|tƒo| p| otidƒdStid |ƒt|ƒptd |ƒ‚nt|tƒo/|i ƒd jotid ƒt |ƒdStid ƒt |||ƒotidƒt Stidƒ| o0t |ƒp t|ƒotid|ƒdStidƒt|ƒ}tidƒt|||ƒ}tid|ƒtid|ƒt|||ƒtid|ƒdS(sñ Creates the partition table. Parameters: definition: dictionary describing how to create the partition. The following are supported values in the dict: overwrite: Should the partition table be created regardless of any pre-exisiting data? layout: the layout of the partition table table_type: Which partition table to use, defaults to MBR device: the device to work on. s!Checking values for %s definitiont overwriteR~R†tmbrs Checking against default devicess)Device is not to be partitioned, skippingNs'Checking if device %s is a valid devicesDevice %s is not a disk device!tremoves,Instructed to remove partition table entriess!Checking if device layout matchess"Device partitioning layout matchess'Checking if device is safe to partitions-Skipping partitioning on configured device %ssChecking for device sizesCalculating partition layouts Layout is: %ssCreating partition table on %ssPartition table created for %s(RRRRURR|RWRRRKR¢R‡RRRhR`RmR£Rª(RR&R«R~R†t device_sizeR‹((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyR<s>    #     "   cCsphdd6dd6dd6dd6}d|iƒjo d}n|iƒ|jo ||Stid|ƒdS( s9 A force flag might be -F or -F, this look it up s-Ftexts-ftbtrfstxfstreiserfssForce flag for %s is unknown.RT(RKRR(tfstflags((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytlookup_force_flagys    c Csˆ|idƒ}|idƒ}t|iddƒƒ}|idƒ}|idgƒ}|idgƒ}|idtƒ}|id tƒ}tid |ƒ| p |iƒoÝ|iƒo'd ||f}tid ||ƒntid |ƒt|ƒ\} } } tid|| | ƒ| |joM| |jo@tid|ƒ|ptid|ƒdStid|ƒqÐtid|ƒnB|oót|ƒiƒd+joÚ|} tid|ƒt } |iƒdjo t} nt |d|d|d| d|ƒ\}}tid| |ƒ|otidƒdS| o#|o|otid|ƒn|ptid|ƒdSnH| pt|ƒiƒdjotid|ƒntidƒdStid||ƒ|ptid |ƒdS|p|pt d!|ƒ‚n|o'|dh|d6|d6|d6}n{t i d"|ƒ}|pt i d#|ƒ}n|ptid$||ƒdS||g}|o|id%|gƒn| o1|pt|ƒd&jo|it|ƒƒn|o|i|ƒntid'||ƒtid(d)i|ƒƒyt i|ƒWn+t j o}t d*||fƒ‚nXdS(,s¦ Create a file system on the device. label: defines the label to use on the device fs_cfg: defines how the filesystem is to look The following values are required generally: device: which device or cloud defined default_device filesystem: which file system type overwrite: indiscriminately create the file system partition: when device does not define a partition, setting this to a number will mean device + partition. When set to 'auto', the first free device or the first device which matches both label and type will be used. 'any' means the first filesystem that matches on the device. When 'cmd' is provided then no other parameter is required. RDRR0tanyt filesystemtcmdt extra_optsRcR«s#Checking %s against default devicess%s%ss%Manual request of partition %s for %ssChecking device %ssDevice %s has %s %ss Existing file system found at %ss"Device %s has required file systemNsDestroying filesystem on %ss"Device %s is cleared for formatingtautos,Identifying device to create %s filesytem onR\Rbs(Automatic device for %s identified as %ss+Found filesystem match, skipping formating.s*Replacing file system on %s as instructed.sCNo device aviable that matches request. Skipping fs creation for %stnones.Using the raw device to place filesystem %s ons(Error in device identification handling.s$File system %s will be created on %ssDevice is not known: %ss@No way to create filesystem '%s'. fs_type or fs_cmd must be set.smkfs.%ssmk%ss.Cannot create fstype '%s'. No mkfs.%s commands-LR%sCreating file system %s on %ss Using cmd: %st sFailed to exec of '%s': %s(Rºsany(RRRURRR{R^RRKRRReRRtwhichtextendRSRFRµR‰RG(tfs_cfgRDRR0R\tfs_cmdtfs_optst fs_replaceR«t check_labelRgR_todeviceRbtreusetmkfs_cmdR'((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pyRsœ       !    "(.tcloudinit.settingsRt cloudinitRtloggingR—R7t frequencyR½R¦RiRERZR¥R t getLoggert__name__RR(RRR+R@RURQRSRWR^R`RRReRhRmRrR…R‡RRžR¢R£RxR©RªRRµR(((sB/usr/lib/python2.6/site-packages/cloudinit/config/cc_disk_setup.pytsL    )   *    0    ; 4     =