Module Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str keyword Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Call AttributeLoad NameLoad attr Str keyword Call NameLoad Str Call AttributeLoad NameLoad attr Str keyword Num keyword Call NameLoad Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call NameLoad Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad keyword Str If CompareNotEq AttributeLoad NameLoad attr Str body Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad TupleLoad Str Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str Assign NameStore TupleLoad Str Str Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Str Str Str Str Str BinOpMod Str TupleLoad NameLoad NameLoad keyword NameLoad keyword ListLoad Num keyword Num keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Str Str Str BinOpMod Str TupleLoad NameLoad NameLoad Str NameLoad Str keyword NameLoad keyword ListLoad Num keyword Num keyword NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Break Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Dict Str Str BinOpAdd NameLoad Num NameLoad orelse Assign NameStore BinOpMod Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Str Str Str keyword NameLoad keyword ListLoad Num If CompareIn NameLoad NameLoad body Break Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Dict Str Str BinOpAdd NameLoad Num AttributeLoad AttributeLoad NameLoad attr attr orelse Assign NameStore BinOpMod Call NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Str Str NameLoad Str keyword NameLoad keyword ListLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Str Str Str BinOpMod Str TupleLoad NameLoad NameLoad Str NameLoad Str keyword NameLoad keyword ListLoad Num keyword Num keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Str Str Str BinOpMod Str TupleLoad NameLoad NameLoad Str NameLoad Str Str keyword NameLoad keyword ListLoad Num Num keyword Num keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad Str NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpMod Str NameLoad Assign NameStore Str Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If NameLoad body Assign NameStore Str orelse If NameLoad body Assign NameStore Str orelse Assign NameStore Str If BoolOpAnd CompareEq NameLoad Str UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Str Assign NameStore BinOpMod Str NameLoad orelse Assign NameStore IfExp AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore BinOpMod Str NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot NameLoad body Expr Call NameLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str finalbody Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str Str NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareGt NameLoad NameLoad body Assign NameStore BinOpMod Call NameLoad Str Dict Str Str NameLoad NameLoad Raise Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad NameLoad NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str With Call NameLoad NameLoad NameLoad NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Dict Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str NameLoad TryFinally body TryExcept body Expr Yield NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body With Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str AttributeLoad NameLoad attr ExceptHandler type AttributeLoad NameLoad attr name NameStore body With Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad finalbody Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Num Expr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad Str Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad Dict Str Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr keyword NameLoad For TupleStore NameStore NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore BinOpMod Call NameLoad Str Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore BinOpMod Call NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults body Assign NameStore BinOpMod Call NameLoad Str AttributeLoad NameLoad attr Raise Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Dict If Call NameLoad NameLoad AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Expr Call NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Expr Call NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr TryExcept body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str Dict Str AttributeLoad NameLoad attr If NameLoad body Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad orelse Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr comprehension NameStore NameLoad If BoolOpOr UnaryOpNot NameLoad UnaryOpNot NameLoad body Return NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Raise Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str Dict Str Str AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body If CompareEq Call NameLoad AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr orelse Raise decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If UnaryOpNot NameLoad body Return Assign NameStore BinOpSub Call NameLoad NameLoad NameLoad If NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str Dict Str Str Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad If CompareIn Str NameLoad body TryExcept body Expr Call NameLoad SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr Call NameLoad Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Return CompareEq NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Return CompareEq NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Return Str If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Return Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Dict Str Str NameLoad AttributeLoad NameLoad attr Return IfExp NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd NameLoad CompareNotIn NameLoad NameLoad body Assign NameStore Str Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad Dict Str Str Str Str NameLoad NameLoad NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad CompareNotIn NameLoad NameLoad body Assign NameStore Str Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad Dict Str Str Str Str NameLoad NameLoad NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Str handlers ExceptHandler type TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str NameLoad ExceptHandler type AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str NameLoad ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For NameStore NameLoad body If UnaryOpNot BoolOpOr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Raise Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str Dict Str Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If Call NameLoad AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If Call NameLoad AttributeLoad NameLoad attr Str NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr TryExcept body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore BinOpMod Call NameLoad Str AttributeLoad NameLoad attr Raise Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If Call NameLoad AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore AttributeLoad NameLoad attr body If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad BoolOpOr AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr attr Str Assign NameStore Dict Str Str Str NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr ImportFrom alias Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If UnaryOpNot NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore BinOpMod Call NameLoad Str AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Dict Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If UnaryOpNot NameLoad body If BoolOpAnd SubscriptLoad NameLoad Index Str UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Expr Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str Call NameLoad Call AttributeLoad NameLoad attr Str Num Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad Str For NameStore NameLoad body TryExcept body Expr Call NameLoad SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Assign NameStore BinOpMod Call NameLoad Str SubscriptLoad NameLoad Index NameLoad Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad Dict Str Str NameLoad NameLoad Assign SubscriptStore NameLoad Index Str BinOpMult Num Call NameLoad Call AttributeLoad NameLoad attr Str If NameLoad body If BoolOpOr CompareGt Call NameLoad SubscriptLoad NameLoad Index Str Num CompareGt Call NameLoad SubscriptLoad NameLoad Index Str Num body Assign NameStore Call NameLoad Str Raise Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str If BoolOpAnd SubscriptLoad NameLoad Index Str UnaryOpNot SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad TryExcept body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad Dict Str Str Str NameLoad If SubscriptLoad NameLoad Index Str body Expr Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If CompareNotIn Str NameLoad body Return Assign NameStore Str For NameStore NameLoad body Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad If CompareNotEq NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad body AugAssignAdd NameStore BinOpMod Call NameLoad Str Dict Str Str Str NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad If NameLoad body Assign NameStore Call NameLoad Str Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad Dict Str NameLoad decorator_list
N/A N/A contextlib N/A os N/A re N/A socket N/A time ironic_lib disk_utils oslo_concurrency processutils oslo_config cfg oslo_log log logging oslo_serialization jsonutils oslo_utils excutils oslo_utils strutils N/A six six.moves.urllib parse ironic.common dhcp_factory ironic.common exception ironic.common.glance_service service_utils ironic.common.i18n _ ironic.common.i18n _LE ironic.common.i18n _LW ironic.common image_service ironic.common keystone ironic.common states ironic.common utils ironic.conductor utils manager_utils ironic.drivers.modules agent_client ironic.drivers.modules image_cache ironic.drivers utils driver_utils ironic objects N/A deploy_opts N/A N/A N/A cfg StrOpt http_url help ironic-conductor node's HTTP server URL. Example: http://192.1.2.3:8080 deprecated_group pxe N/A N/A cfg StrOpt http_root default /httpboot help ironic-conductor node's HTTP root path. deprecated_group pxe N/A N/A cfg IntOpt erase_devices_priority help N/A _ Priority to run in-band erase devices via the Ironic Python Agent ramdisk. If unset, will use the priority set in the ramdisk (defaults to 10 for the GenericHardwareManager). If set to 0, will not run during cleaning. N/A N/A cfg IntOpt erase_devices_iterations default 1 help N/A _ Number of iterations to be run for erasing devices. N/A N/A cfg BoolOpt power_off_after_deploy_failure default True help N/A _ Whether to power off a node after deploy failure. Defaults to True. N/A CONF N/A cfg CONF N/A N/A N/A CONF register_opts deploy_opts group deploy N/A N/A N/A CONF rootwrap_config /etc/ironic/rootwrap.conf N/A N/A root_helper N/A sudo ironic-rootwrap %s N/A CONF rootwrap_config N/A N/A N/A CONF set_default root_helper root_helper ironic_lib N/A LOG N/A N/A logging getLogger __name__ N/A VALID_ROOT_DEVICE_HINTS N/A set N/A size model wwn serial vendor wwn_with_extension wwn_vendor_extension name N/A SUPPORTED_CAPABILITIES N/A boot_option boot_mode secure_boot trusted_boot disk_label N/A local netboot N/A bios uefi N/A true false N/A true false N/A msdos gpt N/A DISK_LAYOUT_PARAMS N/A root_gb swap_mb ephemeral_gb discovery N/A N/A portal_address portal_port N/A N/A N/A Do iSCSI discovery on portal. N/A N/A N/A utils execute iscsiadm -m discovery -t st -p N/A %s:%s N/A portal_address portal_port run_as_root True check_exit_code N/A 0 attempts 5 delay_on_retry True N/A login_iscsi N/A N/A portal_address portal_port target_iqn N/A N/A N/A Login to an iSCSI target. N/A N/A N/A utils execute iscsiadm -m node -p N/A %s:%s N/A portal_address portal_port -T target_iqn --login run_as_root True check_exit_code N/A 0 attempts 5 delay_on_retry True N/A N/A verify_iscsi_connection target_iqn N/A N/A force_iscsi_lun_update target_iqn N/A N/A check_file_system_for_iscsi_device portal_address portal_port target_iqn N/A check_file_system_for_iscsi_device N/A N/A portal_address portal_port target_iqn N/A N/A N/A Ensure the file system sees the iSCSI block device. N/A check_dir N/A /dev/disk/by-path/ip-%s:%s-iscsi-%s-lun-1 N/A portal_address portal_port target_iqn N/A total_checks N/A N/A CONF disk_utils iscsi_verify_attempts N/A attempt N/A range total_checks N/A N/A N/A N/A N/A os path exists check_dir N/A N/A N/A N/A N/A time sleep 1 N/A N/A N/A LOG debug iSCSI connection not seen by file system. Rechecking. Attempt %(attempt)d out of %(total)d N/A attempt total N/A attempt 1 total_checks N/A N/A msg N/A N/A _ iSCSI connection was not seen by the file system after attempting to verify %d times. total_checks N/A N/A N/A LOG error msg N/A N/A N/A exception InstanceDeployFailure msg N/A verify_iscsi_connection N/A N/A target_iqn N/A N/A N/A Verify iscsi connection. N/A N/A N/A LOG debug Checking for iSCSI target to become active. N/A attempt N/A range N/A N/A CONF disk_utils iscsi_verify_attempts N/A N/A N/A out _err N/A N/A utils execute iscsiadm -m node -S run_as_root True check_exit_code N/A 0 N/A N/A target_iqn out N/A N/A N/A N/A N/A time sleep 1 N/A N/A N/A LOG debug iSCSI connection not active. Rechecking. Attempt %(attempt)d out of %(total)d N/A attempt total N/A attempt 1 N/A N/A CONF disk_utils iscsi_verify_attempts N/A N/A msg N/A N/A _ iSCSI connection did not become active after attempting to verify %d times. N/A N/A CONF disk_utils iscsi_verify_attempts N/A N/A N/A LOG error msg N/A N/A N/A exception InstanceDeployFailure msg N/A force_iscsi_lun_update N/A N/A target_iqn N/A N/A N/A force iSCSI initiator to re-read luns. N/A N/A N/A LOG debug Re-reading iSCSI luns. N/A N/A N/A utils execute iscsiadm -m node -T target_iqn -R run_as_root True check_exit_code N/A 0 N/A logout_iscsi N/A N/A portal_address portal_port target_iqn N/A N/A N/A Logout from an iSCSI target. N/A N/A N/A utils execute iscsiadm -m node -p N/A %s:%s N/A portal_address portal_port -T target_iqn --logout run_as_root True check_exit_code N/A 0 attempts 5 delay_on_retry True N/A delete_iscsi N/A N/A portal_address portal_port target_iqn N/A N/A N/A Delete the iSCSI target. N/A N/A N/A utils execute iscsiadm -m node -p N/A %s:%s N/A portal_address portal_port -T target_iqn -o delete run_as_root True check_exit_code N/A 0 21 attempts 5 delay_on_retry True N/A _replace_lines_in_file N/A N/A path regex_pattern replacement N/A N/A N/A N/A open path f N/A N/A lines N/A N/A f readlines N/A compiled_pattern N/A N/A re compile regex_pattern N/A N/A open path w f N/A N/A line lines N/A N/A line N/A N/A compiled_pattern sub replacement line N/A N/A N/A f write line N/A _replace_root_uuid N/A N/A path root_uuid N/A N/A N/A root N/A UUID=%s root_uuid N/A pattern (\(\(|\{\{) ROOT (\)\)|\}\}) N/A N/A _replace_lines_in_file path pattern root N/A _replace_boot_line N/A N/A path boot_mode is_whole_disk_image trusted_boot N/A False N/A N/A is_whole_disk_image N/A N/A boot_disk_type boot_whole_disk N/A N/A trusted_boot N/A N/A boot_disk_type trusted_boot N/A N/A boot_disk_type boot_partition N/A N/A N/A boot_mode uefi N/A N/A N/A CONF pxe ipxe_enabled N/A N/A pattern ^((set )?default)=.*$ N/A boot_line N/A \1=%s boot_disk_type N/A N/A pxe_cmd N/A N/A N/A CONF pxe ipxe_enabled goto default N/A pattern N/A ^%s .*$ pxe_cmd N/A boot_line N/A %s %s N/A pxe_cmd boot_disk_type N/A N/A _replace_lines_in_file path pattern boot_line N/A _replace_disk_identifier N/A N/A path disk_identifier N/A N/A N/A pattern (\(\(|\{\{) DISK_IDENTIFIER (\)\)|\}\}) N/A N/A _replace_lines_in_file path pattern disk_identifier N/A switch_pxe_config N/A N/A path root_uuid_or_disk_id boot_mode is_whole_disk_image trusted_boot N/A False N/A N/A Switch a pxe config from deployment mode to service mode.

    :param path: path to the pxe config file in tftpboot.
    :param root_uuid_or_disk_id: root uuid in case of partition image or
                                 disk_id in case of whole disk image.
    :param boot_mode: if boot mode is uefi or bios.
    :param is_whole_disk_image: if the image is a whole disk image or not.
    :param trusted_boot: if boot with trusted_boot or not. The usage of
        is_whole_disk_image and trusted_boot are mutually exclusive. You can
        have one or neither, but not both.
     N/A N/A is_whole_disk_image N/A N/A N/A _replace_root_uuid path root_uuid_or_disk_id N/A N/A N/A _replace_disk_identifier path root_uuid_or_disk_id N/A N/A _replace_boot_line path boot_mode is_whole_disk_image trusted_boot N/A notify N/A N/A address port N/A N/A N/A Notify a node that it becomes ready to reboot. N/A s N/A N/A socket socket N/A socket AF_INET N/A socket SOCK_STREAM N/A N/A N/A N/A N/A s connect N/A address port N/A N/A N/A s send done N/A N/A N/A N/A s close N/A get_dev N/A N/A address port iqn lun N/A N/A N/A Returns a device path for given parameters. N/A dev N/A /dev/disk/by-path/ip-%s:%s-iscsi-%s-lun-%s N/A address port iqn lun N/A dev N/A deploy_partition_image N/A N/A address port iqn lun image_path root_mb swap_mb ephemeral_mb ephemeral_format node_uuid preserve_ephemeral configdrive boot_option boot_mode disk_label N/A False None netboot bios None N/A N/A All-in-one function to deploy a partition image to a node.

    :param address: The iSCSI IP address.
    :param port: The iSCSI port number.
    :param iqn: The iSCSI qualified name.
    :param lun: The iSCSI logical unit number.
    :param image_path: Path for the instance's disk image.
    :param root_mb: Size of the root partition in megabytes.
    :param swap_mb: Size of the swap partition in megabytes.
    :param ephemeral_mb: Size of the ephemeral partition in megabytes. If 0,
        no ephemeral partition will be created.
    :param ephemeral_format: The type of file system to format the ephemeral
        partition.
    :param node_uuid: node's uuid. Used for logging.
    :param preserve_ephemeral: If True, no filesystem is written to the
        ephemeral block device, preserving whatever content it had (if the
        partition table has not changed).
    :param configdrive: Optional. Base64 encoded Gzipped configdrive content
                        or configdrive HTTP URL.
    :param boot_option: Can be "local" or "netboot". "netboot" by default.
    :param boot_mode: Can be "bios" or "uefi". "bios" by default.
    :param disk_label: The disk label to be used when creating the
        partition table. Valid values are: "msdos", "gpt" or None; If None
        Ironic will figure it out according to the boot_mode parameter.
    :raises: InstanceDeployFailure if image virtual size is bigger than root
        partition size.
    :returns: a dictionary containing the following keys:
        'root uuid': UUID of root partition
        'efi system partition uuid': UUID of the uefi system partition
                                     (if boot mode is uefi).
        NOTE: If key exists but value is None, it means partition doesn't
              exist.
     N/A image_mb N/A N/A disk_utils get_image_mb image_path N/A N/A image_mb root_mb N/A N/A msg N/A N/A _ Root partition is too small for requested image. Image virtual size: %(image_mb)d MB, Root size: %(root_mb)d MB N/A image_mb root_mb image_mb root_mb N/A N/A N/A exception InstanceDeployFailure msg N/A N/A _iscsi_setup_and_handle_errors address port iqn lun dev N/A N/A uuid_dict_returned N/A N/A disk_utils work_on_disk dev root_mb swap_mb ephemeral_mb ephemeral_format image_path node_uuid preserve_ephemeral preserve_ephemeral configdrive configdrive boot_option boot_option boot_mode boot_mode disk_label disk_label N/A uuid_dict_returned N/A deploy_disk_image N/A N/A address port iqn lun image_path node_uuid N/A N/A N/A All-in-one function to deploy a whole disk image to a node.

    :param address: The iSCSI IP address.
    :param port: The iSCSI port number.
    :param iqn: The iSCSI qualified name.
    :param lun: The iSCSI logical unit number.
    :param image_path: Path for the instance's disk image.
    :param node_uuid: node's uuid. Used for logging. Currently not in use
        by this function but could be used in the future.
    :returns: a dictionary containing the key 'disk identifier' to identify
        the disk which was used for deployment.
     N/A N/A _iscsi_setup_and_handle_errors address port iqn lun dev N/A N/A N/A N/A disk_utils populate_image image_path dev N/A disk_identifier N/A N/A disk_utils get_disk_identifier dev N/A N/A disk identifier disk_identifier N/A _iscsi_setup_and_handle_errors N/A N/A address port iqn lun N/A N/A N/A Function that yields an iSCSI target device to work on.

    :param address: The iSCSI IP address.
    :param port: The iSCSI port number.
    :param iqn: The iSCSI qualified name.
    :param lun: The iSCSI logical unit number.
     N/A dev N/A get_dev address port iqn lun N/A N/A discovery address port N/A N/A login_iscsi address port iqn N/A N/A N/A N/A disk_utils is_block_device dev N/A N/A N/A N/A exception InstanceDeployFailure N/A N/A _ Parent device '%s' not found dev N/A N/A N/A N/A N/A N/A dev N/A N/A N/A N/A processutils ProcessExecutionError N/A err N/A N/A N/A N/A excutils save_and_reraise_exception N/A N/A N/A N/A LOG error N/A _LE Deploy to address %s failed. address N/A N/A N/A LOG error N/A _LE Command: %s N/A err cmd N/A N/A N/A LOG error N/A _LE StdOut: %r N/A err stdout N/A N/A N/A LOG error N/A _LE StdErr: %r N/A err stderr N/A N/A N/A exception InstanceDeployFailure N/A e N/A N/A N/A N/A excutils save_and_reraise_exception N/A N/A N/A N/A LOG error N/A _LE Deploy to address %s failed. address N/A N/A N/A LOG error e N/A N/A N/A logout_iscsi address port iqn N/A N/A delete_iscsi address port iqn N/A N/A contextlib contextmanager notify_ramdisk_to_proceed N/A N/A address N/A N/A N/A Notifies the ramdisk waiting for instructions from Ironic.

    DIB ramdisk (from init script) makes vendor passhthrus and listens
    on port 10000 for Ironic to notify back the completion of the task.
    This method connects to port 10000 of the bare metal running the
    ramdisk and then sends some data to notify the ramdisk to proceed
    with it's next task.

    :param address: The IP address of the node.
     N/A N/A N/A time sleep 3 N/A N/A notify address 10000 N/A check_for_missing_params N/A N/A info_dict error_msg param_prefix N/A N/A N/A Check for empty params in the provided dictionary.

    :param info_dict: The dictionary to inspect.
    :param error_msg: The error message to prefix before printing the
        information about missing parameters.
    :param param_prefix: Add this prefix to each parameter for error messages
    :raises: MissingParameterValue, if one or more parameters are
        empty in the provided dictionary.
     N/A missing_info N/A N/A N/A label value N/A N/A info_dict items N/A N/A N/A value N/A N/A N/A N/A missing_info append N/A param_prefix label N/A missing_info N/A N/A exc_msg N/A _ %(error_msg)s. Missing are: %(missing_info)s N/A N/A N/A exception MissingParameterValue N/A exc_msg N/A error_msg missing_info error_msg missing_info N/A fetch_images N/A N/A ctx cache images_info force_raw N/A True N/A N/A Check for available disk space and fetch images using ImageCache.

    :param ctx: context
    :param cache: ImageCache instance to use for fetching
    :param images_info: list of tuples (image href, destination path)
    :param force_raw: boolean value, whether to convert the image to raw
                      format
    :raises: InstanceDeployFailure if unable to find enough disk space
     N/A N/A N/A N/A N/A image_cache clean_up_caches ctx N/A cache master_dir images_info N/A N/A N/A N/A exception InsufficientDiskSpace N/A e N/A N/A N/A N/A exception InstanceDeployFailure reason e N/A N/A href path images_info N/A N/A N/A N/A cache fetch_image href path ctx ctx force_raw force_raw N/A set_failed_state N/A N/A task msg N/A N/A N/A Sets the deploy status as failed with relevant messages.

    This method sets the deployment as fail with the given message.
    It sets node's provision_state to DEPLOYFAIL and updates last_error
    with the given error message. It also powers off the baremetal node.

    :param task: a TaskManager instance containing the node to act on.
    :param msg: the message to set in last_error of the node.
     N/A node N/A task node N/A N/A N/A N/A N/A task process_event fail N/A N/A N/A N/A exception InvalidState N/A N/A msg2 N/A N/A _LE Internal error. Node %(node)s in provision state "%(state)s" could not transition to a failed state. N/A node state N/A node uuid N/A node provision_state N/A N/A N/A LOG exception msg2 N/A N/A N/A CONF deploy power_off_after_deploy_failure N/A N/A N/A N/A N/A N/A manager_utils node_power_action task N/A states POWER_OFF N/A N/A N/A Exception N/A N/A msg2 N/A N/A _LE Node %s failed to power off while handling deploy failure. This may be a serious condition. Node should be removed from Ironic or put in maintenance mode until the problem is resolved. N/A node uuid N/A N/A N/A LOG exception msg2 N/A N/A node last_error msg N/A N/A N/A node save N/A get_single_nic_with_vif_port_id N/A N/A task N/A N/A N/A Returns the MAC address of a port which has a VIF port id.

    :param task: a TaskManager instance containing the ports to act on.
    :returns: MAC address of the port connected to deployment network.
              None if it cannot find any port with vif id.
     N/A port N/A task ports N/A N/A N/A N/A N/A port extra get vif_port_id N/A N/A N/A port address N/A parse_instance_info_capabilities N/A N/A node N/A N/A N/A Parse the instance_info capabilities.

    One way of having these capabilities set is via Nova, where the
    capabilities are defined in the Flavor extra_spec and passed to
    Ironic by the Nova Ironic driver.

    NOTE: Although our API fully supports JSON fields, to maintain the
    backward compatibility with Juno the Nova Ironic driver is sending
    it as a string.

    :param node: a single Node.
    :raises: InvalidParameterValue if the capabilities string is not a
             dictionary or is malformed.
    :returns: A dictionary with the capabilities if found, otherwise an
              empty dictionary.
     parse_error N/A N/A N/A N/A N/A error_msg N/A N/A _ Error parsing capabilities from Node %s instance_info field. A dictionary or a "jsonified" dictionary is expected. N/A node uuid N/A N/A N/A exception InvalidParameterValue error_msg N/A N/A capabilities N/A N/A N/A node instance_info get capabilities N/A N/A N/A isinstance capabilities N/A six string_types N/A N/A N/A N/A capabilities N/A N/A jsonutils loads capabilities N/A N/A N/A N/A ValueError TypeError N/A N/A N/A parse_error N/A N/A N/A isinstance capabilities dict N/A N/A N/A parse_error N/A capabilities N/A agent_get_clean_steps N/A N/A task interface override_priorities N/A None None N/A N/A Get the list of cached clean steps from the agent.

    #TODO(JoshNang) move to BootInterface

    The clean steps cache is updated at the beginning of cleaning.

    :param task: a TaskManager object containing the node
    :param interface: The interface for which clean steps
        are to be returned. If this is not provided, it returns the
        clean steps for all interfaces.
    :param override_priorities: a dictionary with keys being step names and
        values being new priorities for them. If a step isn't in this
        dictionary, the step's original priority is used.
    :raises NodeCleaningFailure: if the clean steps are not yet cached,
        for example, when a node has just been enrolled and has not been
        cleaned yet.
    :returns: A list of clean step dictionaries
     N/A node N/A task node N/A N/A N/A all_steps N/A N/A node driver_internal_info N/A agent_cached_clean_steps N/A N/A N/A KeyError N/A N/A N/A N/A exception NodeCleaningFailure N/A N/A _ Cleaning steps are not yet available for node %(node)s N/A node N/A node uuid N/A interface N/A N/A steps N/A N/A N/A step copy N/A step N/A N/A all_steps get interface N/A N/A N/A steps N/A N/A N/A step copy N/A step_list N/A N/A all_steps values N/A step step_list N/A N/A N/A steps N/A override_priorities N/A N/A steps N/A step steps N/A N/A new_priority N/A N/A override_priorities get N/A N/A step get step N/A N/A new_priority None N/A N/A N/A step N/A priority new_priority N/A steps N/A agent_execute_clean_step N/A N/A task step N/A N/A N/A Execute a clean step asynchronously on the agent.

    #TODO(JoshNang) move to BootInterface

    :param task: a TaskManager object containing the node
    :param step: a clean step dictionary to execute
    :raises: NodeCleaningFailure if the agent does not return a command status
    :returns: states.CLEANWAIT to signify the step will be completed async
     N/A client N/A N/A agent_client AgentClient N/A ports N/A N/A N/A objects Port list_by_node_id N/A task context N/A N/A task node id N/A result N/A N/A client execute_clean_step step N/A task node ports N/A N/A N/A N/A result get command_status N/A N/A N/A N/A exception NodeCleaningFailure N/A N/A _ Agent on node %(node)s returned bad command result: %(result)s N/A node result N/A N/A task node uuid N/A N/A result get command_error N/A N/A states CLEANWAIT N/A agent_add_clean_params N/A N/A task N/A N/A N/A Add required config parameters to node's driver_internal_info.

    Adds the required conf options to node's driver_internal_info.
    It is Required to pass the information to IPA.

    :param task: a TaskManager instance.
     N/A info N/A N/A task node driver_internal_info N/A passes N/A N/A CONF deploy erase_devices_iterations N/A N/A info N/A agent_erase_devices_iterations passes N/A N/A N/A task node driver_internal_info info N/A N/A N/A N/A task node save N/A try_set_boot_device N/A N/A task device persistent N/A True N/A N/A Tries to set the boot device on the node.

    This method tries to set the boot device on the node to the given
    boot device.  Under uefi boot mode, setting of boot device may differ
    between different machines. IPMI does not work for setting boot
    devices in uefi mode for certain machines.  This method ignores the
    expected IPMI failure for uefi boot mode and just logs a message.
    In error cases, it is expected the operator has to manually set the
    node to boot from the correct device.

    :param task: a TaskManager object containing the node
    :param device: the boot device
    :param persistent: Whether to set the boot device persistently
    :raises: Any exception from set_boot_device except IPMIFailure
        (setting of boot device using ipmi is expected to fail).
     N/A N/A N/A N/A N/A manager_utils node_set_boot_device task device persistent persistent N/A N/A N/A N/A exception IPMIFailure N/A N/A N/A N/A get_boot_mode_for_deploy N/A task node uefi N/A N/A N/A N/A LOG warning N/A N/A _LW ipmitool is unable to set boot device while the node %s is in UEFI boot mode. Please set the boot device manually. N/A N/A task node uuid N/A N/A N/A parse_root_device_hints N/A N/A node N/A N/A N/A Parse the root_device property of a node.

    Parse the root_device property of a node and make it a flat string
    to be passed via the PXE config.

    :param node: a single Node.
    :returns: A flat string with the following format
              opt1=value1,opt2=value2. Or None if the
              Node contains no hints.
    :raises: InvalidParameterValue, if some information is invalid.

     N/A root_device N/A N/A N/A node properties get root_device N/A N/A root_device N/A N/A N/A invalid_hints N/A N/A set root_device VALID_ROOT_DEVICE_HINTS N/A invalid_hints N/A N/A N/A N/A exception InvalidParameterValue N/A N/A _ The hints "%(invalid_hints)s" are invalid. Valid hints are: "%(valid_hints)s" N/A invalid_hints valid_hints N/A N/A ,  join invalid_hints N/A N/A ,  join VALID_ROOT_DEVICE_HINTS N/A N/A size root_device N/A N/A N/A N/A N/A int N/A root_device N/A size N/A N/A N/A ValueError N/A N/A N/A N/A exception InvalidParameterValue N/A _ Root device hint "size" is not an integer value. N/A hints N/A N/A N/A key value N/A sorted N/A N/A root_device items N/A N/A N/A isinstance value N/A six string_types N/A N/A value N/A N/A value strip N/A value N/A N/A parse quote value N/A N/A N/A hints append N/A %s=%s N/A key value N/A N/A N/A , join hints N/A is_secure_boot_requested N/A N/A node N/A N/A N/A Returns True if secure_boot is requested for deploy.

    This method checks node property for secure_boot and returns True
    if it is requested.

    :param node: a single Node.
    :raises: InvalidParameterValue if the capabilities string is not a
             dictionary or is malformed.
    :returns: True if secure_boot is requested.
     N/A capabilities N/A parse_instance_info_capabilities node N/A sec_boot N/A N/A N/A N/A capabilities get secure_boot false lower N/A N/A sec_boot true N/A is_trusted_boot_requested N/A N/A node N/A N/A N/A Returns True if trusted_boot is requested for deploy.

    This method checks instance property for trusted_boot and returns True
    if it is requested.

    :param node: a single Node.
    :raises: InvalidParameterValue if the capabilities string is not a
             dictionary or is malformed.
    :returns: True if trusted_boot is requested.
     N/A capabilities N/A parse_instance_info_capabilities node N/A trusted_boot N/A N/A N/A N/A capabilities get trusted_boot false lower N/A N/A trusted_boot true N/A get_disk_label N/A N/A node N/A N/A N/A Return the disk label requested for deploy, if any.

    :param node: a single Node.
    :raises: InvalidParameterValue if the capabilities string is not a
             dictionary or is malformed.
    :returns: the disk label or None if no disk label was specified.
     N/A capabilities N/A parse_instance_info_capabilities node N/A N/A N/A capabilities get disk_label N/A get_boot_mode_for_deploy N/A N/A node N/A N/A N/A Returns the boot mode that would be used for deploy.

    This method returns boot mode to be used for deploy.
    It returns 'uefi' if 'secure_boot' is set to 'true' or returns 'bios' if
    'trusted_boot' is set to 'true' in 'instance_info/capabilities' of node.
    Otherwise it returns value of 'boot_mode' in 'properties/capabilities'
    of node if set. If that is not set, it returns boot mode in
    'instance_info/deploy_boot_mode' for the node.
    It would return None if boot mode is present neither in 'capabilities' of
    node 'properties' nor in node's 'instance_info' (which could also be None).

    :param node: an ironic node object.
    :returns: 'bios', 'uefi' or None
     N/A N/A is_secure_boot_requested node N/A N/A N/A N/A LOG debug Deploy boot mode is uefi for %s. N/A node uuid N/A uefi N/A N/A is_trusted_boot_requested node N/A N/A N/A N/A LOG debug Deploy boot mode is bios for %s. N/A node uuid N/A bios N/A boot_mode N/A N/A driver_utils get_node_capability node boot_mode N/A N/A boot_mode None N/A N/A instance_info N/A node instance_info N/A boot_mode N/A N/A instance_info get deploy_boot_mode N/A N/A N/A LOG debug Deploy boot mode is %(boot_mode)s for %(node)s. N/A boot_mode node boot_mode N/A node uuid N/A N/A boot_mode N/A N/A boot_mode lower boot_mode N/A validate_capabilities N/A N/A node N/A N/A N/A Validates that specified supported capabilities have valid value

    This method checks if the any of the supported capability is present in
    Node capabilities. For all supported capabilities specified for a Node,
    it validates that it has a valid value.
    The node can have capability as part of the 'properties' or
    'instance_info' or both.
    Note that the actual value of a capability does not need to be the same
    in the node's 'properties' and 'instance_info'.

    :param node: an ironic node object.
    :raises: InvalidParameterValue, if the capability is not set to a
        valid value.
     N/A exp_str N/A _ The parameter '%(capability)s' from %(field)s has an invalid value: '%(value)s'. Acceptable values are: %(valid_values)s. N/A N/A capability_name valid_values N/A N/A SUPPORTED_CAPABILITIES items N/A N/A value N/A N/A driver_utils get_node_capability node capability_name N/A N/A value N/A value valid_values N/A N/A field properties/capabilities N/A N/A N/A exception InvalidParameterValue N/A exp_str N/A capability field value valid_values capability_name field value N/A N/A ,  join valid_values N/A capabilities N/A parse_instance_info_capabilities node N/A value N/A N/A capabilities get capability_name N/A N/A value N/A value valid_values N/A N/A field instance_info['capabilities'] N/A N/A N/A exception InvalidParameterValue N/A exp_str N/A capability field value valid_values capability_name field value N/A N/A ,  join valid_values N/A validate_image_properties N/A N/A ctx deploy_info properties N/A N/A N/A Validate the image.

    For Glance images it checks that the image exists in Glance and its
    properties or deployment info contain the properties passed. If it's not a
    Glance image, it checks that deployment info contains needed properties.

    :param ctx: security context
    :param deploy_info: the deploy_info to be validated
    :param properties: the list of image meta-properties to be validated.
    :raises: InvalidParameterValue if:
        * connection to glance failed;
        * authorization for accessing image failed;
        * HEAD request to image URL failed or returned response code != 200;
        * HEAD request response does not contain Content-Length header;
        * the protocol specified in image URL is not supported.
    :raises: MissingParameterValue if the image doesn't contain
        the mentioned properties.
     N/A image_href N/A deploy_info N/A image_source N/A N/A N/A img_service N/A N/A image_service get_image_service image_href context ctx N/A image_props N/A N/A N/A img_service show image_href N/A properties N/A N/A N/A N/A N/A exception GlanceConnectionFailed N/A exception ImageNotAuthorized N/A exception Invalid N/A N/A N/A N/A exception InvalidParameterValue N/A N/A _ Failed to connect to Glance to get the properties of the image %s image_href N/A N/A N/A exception ImageNotFound N/A N/A N/A N/A exception InvalidParameterValue N/A N/A _ Image %s can not be found. image_href N/A N/A N/A exception ImageRefValidationFailed N/A e N/A N/A N/A N/A exception InvalidParameterValue e N/A missing_props N/A N/A prop properties N/A N/A N/A N/A N/A N/A deploy_info get prop N/A N/A image_props get prop N/A N/A N/A N/A missing_props append prop N/A missing_props N/A N/A props N/A N/A ,  join missing_props N/A N/A N/A exception MissingParameterValue N/A N/A _ Image %(image)s is missing the following properties: %(properties)s N/A image properties image_href props N/A get_boot_option N/A N/A node N/A N/A N/A Gets the boot option.

    :param node: A single Node.
    :raises: InvalidParameterValue if the capabilities string is not a
         dict or is malformed.
    :returns: A string representing the boot option type. Defaults to
        'netboot'.
     N/A capabilities N/A parse_instance_info_capabilities node N/A N/A N/A N/A N/A capabilities get boot_option netboot lower N/A prepare_cleaning_ports N/A N/A task N/A N/A N/A Prepare the Ironic ports of the node for cleaning.

    This method deletes the cleaning ports currently existing
    for all the ports of the node and then creates a new one
    for each one of them.  It also adds 'vif_port_id' to port.extra
    of each Ironic port, after creating the cleaning ports.

    :param task: a TaskManager object containing the node
    :raises NodeCleaningFailure: if the previous cleaning ports cannot
        be removed or if new cleaning ports cannot be created
     N/A provider N/A N/A dhcp_factory DHCPFactory N/A N/A getattr N/A provider provider delete_cleaning_ports None N/A N/A N/A N/A N/A provider provider delete_cleaning_ports task N/A N/A getattr N/A provider provider create_cleaning_ports None N/A N/A ports N/A N/A N/A provider provider create_cleaning_ports task N/A port N/A task ports N/A N/A extra_dict N/A port extra N/A N/A N/A N/A extra_dict N/A vif_port_id N/A ports N/A N/A port uuid N/A N/A N/A KeyError N/A N/A error N/A N/A _ When creating cleaning ports, DHCP provider didn't return VIF port ID for %s N/A port uuid N/A N/A N/A exception NodeCleaningFailure node N/A N/A task node uuid reason error N/A N/A N/A port extra extra_dict N/A N/A N/A port save N/A tear_down_cleaning_ports N/A N/A task N/A N/A N/A Deletes the cleaning ports created for each of the Ironic ports.

    This method deletes the cleaning port created before cleaning
    was started.

    :param task: a TaskManager object containing the node
    :raises NodeCleaningFailure: if the cleaning ports cannot be
        removed.
     N/A provider N/A N/A dhcp_factory DHCPFactory N/A N/A getattr N/A provider provider delete_cleaning_ports None N/A N/A N/A N/A N/A provider provider delete_cleaning_ports task N/A port N/A task ports N/A N/A N/A vif_port_id N/A port extra N/A N/A extra_dict N/A port extra N/A N/A N/A extra_dict pop vif_port_id None N/A N/A port extra extra_dict N/A N/A N/A port save N/A build_agent_options N/A N/A node N/A N/A N/A Build the options to be passed to the agent ramdisk.

    :param node: an ironic node object
    :returns: a dictionary containing the parameters to be passed to
        agent ramdisk.
     N/A ironic_api N/A N/A N/A N/A N/A CONF conductor api_url N/A N/A keystone get_service_url rstrip / N/A agent_config_opts N/A ipa-api-url ipa-driver-name coreos.configdrive ironic_api N/A node driver 0 N/A root_device N/A parse_root_device_hints node N/A root_device N/A N/A N/A agent_config_opts N/A root_device root_device N/A agent_config_opts N/A prepare_inband_cleaning N/A N/A task manage_boot N/A True N/A N/A Prepares the node to boot into agent for in-band cleaning.

    This method does the following:
    1. Prepares the cleaning ports for the bare metal
       node and updates the clean parameters in node's driver_internal_info.
    2. If 'manage_boot' parameter is set to true, it also calls the
       'prepare_ramdisk' method of boot interface to boot the agent ramdisk.
    3. Reboots the bare metal node.

    :param task: a TaskManager object containing the node
    :param manage_boot: If this is set to True, this method calls the
        'prepare_ramdisk' method of boot interface to boot the agent
        ramdisk. If False, it skips preparing the boot agent ramdisk using
        boot interface, and assumes that the environment is setup to
        automatically boot agent ramdisk every time bare metal node is
        rebooted.
    :returns: states.CLEANWAIT to signify an asynchronous prepare.
    :raises NodeCleaningFailure: if the previous cleaning ports cannot
        be removed or if new cleaning ports cannot be created
     N/A N/A prepare_cleaning_ports task N/A N/A agent_add_clean_params task N/A manage_boot N/A N/A ramdisk_opts N/A build_agent_options N/A task node ironic.drivers.modules iscsi_deploy N/A N/A N/A ramdisk_opts update N/A N/A iscsi_deploy build_deploy_ramdisk_options N/A task node N/A N/A N/A N/A N/A task driver boot prepare_ramdisk task ramdisk_opts N/A N/A N/A manager_utils node_power_action task N/A states REBOOT N/A N/A states CLEANWAIT N/A tear_down_inband_cleaning N/A N/A task manage_boot N/A True N/A N/A Tears down the environment setup for in-band cleaning.

    This method does the following:
    1. Powers off the bare metal node.
    2. If 'manage_boot' parameter is set to true, it also
    calls the 'clean_up_ramdisk' method of boot interface to clean up
    the environment that was set for booting agent ramdisk.
    3. Deletes the cleaning ports which were setup as part
    of cleaning.

    :param task: a TaskManager object containing the node
    :param manage_boot: If this is set to True, this method calls the
        'clean_up_ramdisk' method of boot interface to boot the agent
        ramdisk. If False, it skips this step.
    :raises NodeCleaningFailure: if the cleaning ports cannot be
        removed.
     N/A N/A N/A manager_utils node_power_action task N/A states POWER_OFF N/A manage_boot N/A N/A N/A N/A N/A N/A task driver boot clean_up_ramdisk task N/A N/A tear_down_cleaning_ports task N/A get_image_instance_info N/A N/A node N/A N/A N/A Gets the image information from the node.

    Get image information for the given node instance from its
    'instance_info' property.

    :param node: a single Node.
    :returns: A dict with required image properties retrieved from
        node's 'instance_info'.
    :raises: MissingParameterValue, if image_source is missing in node's
        instance_info. Also raises same exception if kernel/ramdisk is
        missing in instance_info for non-glance images.
     N/A info N/A N/A N/A info N/A image_source N/A N/A N/A node instance_info get image_source N/A is_whole_disk_image N/A N/A N/A node driver_internal_info get is_whole_disk_image N/A N/A is_whole_disk_image N/A N/A N/A N/A N/A service_utils is_glance_image N/A info N/A image_source N/A N/A N/A info N/A kernel N/A N/A N/A node instance_info get kernel N/A N/A info N/A ramdisk N/A N/A N/A node instance_info get ramdisk N/A error_msg N/A N/A _ Cannot validate image information for node %s because one or more parameters are missing from its instance_info. N/A node uuid N/A N/A check_for_missing_params info error_msg N/A info N/A parse_instance_info N/A N/A node N/A N/A N/A Gets the instance specific Node deployment info.

    This method validates whether the 'instance_info' property of the
    supplied node contains the required information for this driver to
    deploy images to the node.

    :param node: a single Node.
    :returns: A dict with the instance_info values.
    :raises: MissingParameterValue, if any of the required parameters are
        missing.
    :raises: InvalidParameterValue, if any of the parameters have invalid
        value.
     N/A info N/A node instance_info N/A i_info N/A N/A N/A i_info N/A image_source N/A N/A info get image_source N/A iwdi N/A N/A N/A node driver_internal_info get is_whole_disk_image N/A N/A iwdi N/A N/A N/A N/A i_info N/A image_source N/A N/A N/A service_utils is_glance_image N/A i_info N/A image_source N/A N/A N/A i_info N/A kernel N/A N/A info get kernel N/A N/A i_info N/A ramdisk N/A N/A info get ramdisk N/A N/A i_info N/A root_gb N/A N/A info get root_gb N/A error_msg N/A _ Cannot validate driver deploy. Some parameters were missing in node's instance_info N/A N/A check_for_missing_params i_info error_msg N/A N/A i_info N/A deploy_key N/A N/A info get deploy_key N/A N/A i_info N/A swap_mb N/A int N/A N/A info get swap_mb 0 N/A N/A i_info N/A ephemeral_gb N/A N/A info get ephemeral_gb 0 N/A err_msg_invalid N/A _ Cannot validate parameter for driver deploy. Invalid parameter %(param)s. Reason: %(reason)s N/A param DISK_LAYOUT_PARAMS N/A N/A N/A N/A N/A int N/A i_info N/A param N/A N/A N/A ValueError N/A N/A reason N/A N/A _ %s is not an integer value. N/A i_info N/A param N/A N/A N/A exception InvalidParameterValue N/A err_msg_invalid N/A param reason param reason N/A N/A i_info N/A root_mb N/A 1024 N/A int N/A N/A info get root_gb N/A iwdi N/A N/A N/A N/A N/A int N/A i_info N/A swap_mb 0 N/A N/A int N/A i_info N/A ephemeral_gb 0 N/A N/A err_msg_invalid N/A _ Cannot deploy whole disk image with swap or ephemeral size set N/A N/A N/A exception InvalidParameterValue err_msg_invalid N/A N/A i_info N/A ephemeral_format N/A N/A info get ephemeral_format N/A N/A i_info N/A configdrive N/A N/A info get configdrive N/A N/A N/A i_info N/A ephemeral_gb N/A N/A i_info N/A ephemeral_format N/A N/A N/A i_info N/A ephemeral_format N/A N/A CONF pxe default_ephemeral_format N/A preserve_ephemeral N/A N/A info get preserve_ephemeral False N/A N/A N/A N/A i_info N/A preserve_ephemeral N/A N/A strutils bool_from_string preserve_ephemeral strict True N/A N/A N/A ValueError N/A e N/A N/A N/A N/A exception InvalidParameterValue N/A err_msg_invalid N/A param reason preserve_ephemeral e N/A N/A i_info N/A preserve_ephemeral N/A N/A N/A _check_disk_layout_unchanged node i_info N/A i_info N/A _check_disk_layout_unchanged N/A N/A node i_info N/A N/A N/A Check whether disk layout is unchanged.

    If the node has already been deployed to, this checks whether the disk
    layout for the node is the same as when it had been deployed to.

    :param node: the node of interest
    :param i_info: instance information (a dictionary) for the node, containing
                   disk layout information
    :raises: InvalidParameterValue if the disk layout changed
     N/A driver_internal_info N/A node driver_internal_info N/A N/A instance driver_internal_info N/A N/A N/A error_msg N/A param DISK_LAYOUT_PARAMS N/A N/A param_value N/A int N/A N/A driver_internal_info N/A instance N/A param N/A N/A param_value N/A int N/A i_info N/A param N/A N/A error_msg N/A N/A _  Deployed value of %(param)s was %(param_value)s but requested value is %(request_value)s. N/A param param_value request_value param param_value N/A i_info N/A param N/A error_msg N/A N/A err_msg_invalid N/A _ The following parameters have different values from previous deployment:%(error_msg)s N/A N/A N/A exception InvalidParameterValue N/A err_msg_invalid N/A error_msg error_msg N/A