Module Import alias Import alias Import alias ImportFrom alias Import alias Import alias Import alias Import alias FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return Call NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Str body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd CompareEq Call NameLoad NameLoad Num CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad If CompareEq Call NameLoad NameLoad Num body Return Call NameLoad NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index NameLoad BinOpAdd NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num Str handlers ExceptHandler body Continue If UnaryOpNot Call AttributeLoad NameLoad attr Str body Continue For NameStore Call AttributeLoad NameLoad attr Str body If UnaryOpNot Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str NameLoad Str body Continue For NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str NameLoad Str body If Call AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad NameLoad attr Dict Str Str Str SubscriptLoad NameLoad Index Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr If CompareEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad If CompareGt Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Str Assign NameStore BinOpAdd BinOpAdd Str SubscriptLoad NameLoad Index Str Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd BinOpAdd NameLoad Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str ListLoad Str Str Str NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr Str ListLoad Str Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str ListLoad Str Str NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If NameLoad body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body If CompareIn Str NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body If CompareIn Str NameLoad body Raise Call NameLoad Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Str NameLoad body Expr Str Assign NameStore ListLoad Str Str NameLoad Str Str Str Str Str Str Str BinOpAdd Str Call NameLoad NameLoad Str Str Str Str Str Str If NameLoad body Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Str body Return Call NameLoad NameLoad orelse Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body For NameStore TupleLoad Str Str BinOpMod Str NameLoad Str body TryExcept body Expr Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Pass TryExcept body Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Str If UnaryOpNot Call AttributeLoad NameLoad attr Str NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body For NameStore Str body TryExcept body Expr Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs Call NameLoad NameLoad NameLoad body Return NameLoad If CompareIs Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad If CompareIs Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str CompareEq NameLoad Str body Return NameLoad If BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str CompareEq NameLoad Str body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad If NameLoad body Return NameLoad orelse Return AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad If NameLoad body Return SubscriptLoad NameLoad Index Num orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Num Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq SubscriptLoad NameLoad Index Num NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TryExcept body Assign NameStore ListLoad Str Str Str Str Str Str AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore ListLoad Str Str Str Str If NameLoad body AugAssignAdd NameStore ListLoad Str If Call NameLoad body AugAssignAdd NameStore ListLoad Str Str AugAssignAdd NameStore ListLoad NameLoad NameLoad Return NameLoad decorator_list
N/A N/A guestfs N/A os N/A re imgfac.ImageFactoryException ImageFactoryException N/A subprocess N/A logging N/A struct N/A tempfile launch_inspect_and_mount N/A N/A diskfile readonly N/A False N/A N/A g N/A N/A guestfs GuestFS N/A readonly N/A N/A N/A N/A g add_drive_ro diskfile N/A N/A N/A N/A g add_drive diskfile N/A N/A N/A g launch N/A N/A inspect_and_mount g diskfile diskfile N/A inspect_and_mount N/A N/A guestfs_handle relative_mount diskfile N/A *unspecified* N/A N/A g guestfs_handle N/A inspection N/A N/A g inspect_os N/A N/A N/A N/A len inspection 0 N/A N/A len relative_mount 0 N/A N/A N/A Exception N/A Unable to find an OS on disk image (%s) diskfile N/A N/A N/A len inspection 0 N/A N/A N/A inspect_ostree guestfs_handle diskfile N/A N/A N/A len inspection 1 N/A N/A N/A Exception N/A Found multiple OSes on disk image (%s) diskfile N/A filesystems N/A N/A g inspect_get_mountpoints N/A inspection N/A 0 N/A fshash N/A N/A filesystem filesystems N/A N/A N/A fshash N/A N/A filesystem N/A 0 N/A filesystem N/A 1 N/A mountpoints N/A N/A fshash keys N/A N/A N/A mountpoints sort key len N/A mountpoint mountpoints N/A N/A N/A N/A g mount_options N/A fshash N/A mountpoint N/A relative_mount mountpoint N/A g N/A inspect_ostree N/A N/A g diskfile N/A N/A N/A Make a best effort attempt to find and mount up the root rpm-ostree N/A trees N/A N/A fs N/A N/A g list_filesystems N/A N/A N/A N/A N/A N/A g mount_options N/A fs N/A 0 / N/A N/A N/A N/A N/A N/A N/A N/A g is_dir /ostree/deploy N/A N/A N/A subdir N/A N/A g ls /ostree/deploy N/A N/A N/A N/A N/A g is_dir N/A N/A /ostree/deploy/ subdir /deploy N/A N/A N/A candidate N/A N/A g ls N/A N/A /ostree/deploy/ subdir /deploy N/A N/A N/A N/A re match .*\.[0-9]$ candidate N/A N/A N/A N/A trees append N/A device os root N/A fs N/A 0 subdir candidate N/A N/A N/A g umount_all N/A N/A N/A len trees 0 N/A N/A N/A Exception N/A Unable to find libguestfs inspectable image or rpm-ostree image on (%s) diskfile N/A N/A N/A len trees 1 N/A N/A N/A Exception N/A Multiple rpm-ostrees found on image (%s). This should never happen diskfile N/A tree N/A trees N/A 0 N/A N/A N/A g mount_options N/A tree N/A device / N/A ostree N/A N/A /sysroot/ostree/deploy/ N/A tree N/A os / N/A realvar N/A ostree var N/A root N/A N/A ostree deploy/ N/A tree N/A root N/A N/A N/A g debug sh N/A mount -o bind root root N/A varbindmntpoint N/A root /var N/A N/A N/A g debug sh N/A mount -o bind realvar varbindmntpoint N/A N/A N/A g debug sh N/A mount --move root /sysroot N/A g N/A shutdown_and_close N/A N/A guestfs_handle N/A N/A N/A shutdown_result N/A N/A guestfs_handle shutdown N/A N/A N/A guestfs_handle close N/A shutdown_result N/A N/A N/A Exception Error encountered during guestfs shutdown - data may not have been written out N/A remove_net_persist N/A N/A guestfs_handle N/A N/A N/A g guestfs_handle N/A N/A N/A g is_file /etc/udev/rules.d/70-persistent-net.rules N/A N/A N/A N/A g rm /etc/udev/rules.d/70-persistent-net.rules N/A N/A N/A g aug_init / 0 N/A N/A N/A g aug_rm /files/etc/sysconfig/network-scripts/ifcfg-eth0/HWADDR N/A N/A N/A g aug_save N/A N/A N/A g aug_close N/A create_cloud_info N/A N/A guestfs_handle target N/A N/A N/A tmpl N/A CLOUD_TYPE="%s"
 target N/A N/A N/A guestfs_handle write /etc/sysconfig/cloud-info tmpl N/A subprocess_check_output N/A N/A N/A popenargs kwargs N/A N/A N/A stdout kwargs N/A N/A N/A ValueError stdout argument not allowed, it will be overridden. N/A process N/A N/A subprocess Popen stdout N/A subprocess PIPE stderr N/A subprocess STDOUT popenargs kwargs N/A N/A stdout stderr N/A N/A process communicate N/A retcode N/A N/A process poll N/A retcode N/A N/A cmd N/A N/A join popenargs N/A N/A ImageFactoryException N/A '%s' failed(%d): %s N/A cmd retcode stderr N/A N/A stdout stderr retcode N/A subprocess_check_output_pty N/A N/A N/A popenargs kwargs N/A N/A N/A stdout kwargs N/A N/A N/A ValueError stdout argument not allowed, it will be overridden. N/A N/A master slave N/A N/A os openpty N/A process N/A N/A subprocess Popen stdin slave stdout N/A subprocess PIPE stderr N/A subprocess STDOUT popenargs kwargs N/A N/A stdout stderr N/A N/A process communicate N/A retcode N/A N/A process poll N/A N/A N/A os close slave N/A N/A N/A os close master N/A retcode N/A N/A cmd N/A N/A join popenargs N/A N/A ImageFactoryException N/A '%s' failed(%d): %s N/A cmd retcode stderr N/A N/A stdout stderr retcode N/A ssh_execute_command N/A N/A guestaddr sshprivkey command timeout user prefix N/A 10 root None N/A N/A 
    Function to execute a command on the guest using SSH and return the output.
    Modified version of function from ozutil to allow us to deal with non-root
    authorized users on ec2
     N/A cmd N/A ssh -i sshprivkey -F /dev/null -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -o N/A ConnectTimeout= N/A str timeout -o UserKnownHostsFile=/dev/null -t -t -o PasswordAuthentication=no N/A prefix N/A N/A command N/A N/A prefix command N/A N/A N/A cmd extend N/A N/A %s@%s N/A user guestaddr command N/A N/A prefix sudo N/A N/A N/A subprocess_check_output_pty cmd N/A N/A N/A subprocess_check_output cmd N/A enable_root N/A N/A guestaddr sshprivkey user prefix N/A N/A N/A cmd N/A mkdir /root/.ssh chmod 600 /root/.ssh N/A cp /home/%s/.ssh/authorized_keys /root/.ssh user chmod 600 /root/.ssh/authorized_keys N/A N/A N/A N/A N/A ssh_execute_command guestaddr sshprivkey cmd user user prefix prefix N/A log N/A N/A logging getLogger __name__ N/A N/A N/A log debug N/A Executing command on %s as %s: %s N/A guestaddr user cmd N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A N/A stdout stderr retcode N/A ssh_execute_command guestaddr sshprivkey /bin/id N/A N/A N/A N/A re search uid=0 stdout N/A N/A N/A Exception N/A Running /bin/id on %s as root: %s N/A guestaddr stdout N/A N/A N/A Exception N/A e N/A N/A N/A ImageFactoryException N/A Transfer of authorized_keys to root from %s must have failed - Aborting - %s N/A user e N/A disable_root N/A N/A guestaddr sshprivkey user prefix N/A N/A N/A cmd rm -rf /root/.ssh N/A N/A N/A N/A N/A ssh_execute_command guestaddr sshprivkey cmd user user prefix prefix N/A log N/A N/A logging getLogger __name__ N/A N/A N/A log debug N/A Executing command on %s as %s: %s N/A guestaddr user cmd N/A N/A N/A Exception N/A e N/A N/A N/A parameter_cast_to_bool N/A N/A ival N/A N/A N/A 
    Function to take an input that may be a string, an int or a bool
    If input is a string it is made lowecase
    Returns True if ival is boolean True, a non-zero integer, "Yes",
    "True" or "1"
    Returns False in ival is boolean False, zero, "No", "False" or "0"
    In all other cases, returns None
     N/A N/A N/A type ival bool N/A N/A ival N/A N/A N/A type ival int N/A N/A N/A bool ival N/A N/A N/A type ival str N/A N/A lower N/A N/A ival lower N/A N/A N/A lower no N/A lower false N/A lower 0 N/A N/A False N/A N/A N/A lower yes N/A lower true N/A lower 1 N/A N/A True N/A None N/A disk_image_capacity N/A N/A filename N/A N/A N/A qcow_size N/A check_qcow_size filename N/A qcow_size N/A N/A qcow_size N/A N/A N/A N/A N/A os stat filename st_size N/A check_qcow_size N/A N/A filename N/A N/A N/A unpack N/A unpack_qcow_header filename N/A unpack N/A N/A N/A unpack N/A 5 N/A N/A None N/A unpack_qcow_header N/A N/A filename N/A N/A N/A qcow_struct >IIQIIQIIQQIIQ N/A qcow_magic 1363560955 N/A f N/A open filename r N/A pack N/A N/A f read N/A N/A struct calcsize qcow_struct N/A N/A N/A f close N/A unpack N/A N/A struct unpack qcow_struct pack N/A N/A N/A unpack N/A 0 qcow_magic N/A N/A unpack N/A N/A None N/A _qemu_compat_supported N/A N/A N/A N/A N/A tf N/A N/A tempfile NamedTemporaryFile N/A N/A N/A tf close N/A N/A N/A cmd N/A qemu-img create -f qcow2 -o compat=0.10 N/A tf name 1G N/A N/A subprocess_check_output cmd N/A N/A N/A os unlink N/A tf name N/A True N/A N/A N/A ImageFactoryException N/A N/A False N/A qemu_convert_cmd N/A N/A inputfn outputfn compress N/A False N/A N/A convert_cmd N/A qemu-img convert -O qcow2 N/A compress N/A N/A convert_cmd N/A -c N/A N/A _qemu_compat_supported N/A N/A convert_cmd N/A -o compat=0.10 N/A convert_cmd N/A inputfn outputfn N/A convert_cmd N/A