Module Expr Str Import alias Import alias Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad Str Str ClassDef bases NameLoad body Assign NameStore Call NameLoad Str Num Assign NameStore Call NameLoad Str Num Assign NameStore Call NameLoad Str Num Assign NameStore Call NameLoad Str Num Assign NameStore Call NameLoad Str Num Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list Assign NameStore Dict Str Str Num Num FunctionDef arguments args NameParam NameParam defaults Num body Expr Str If CompareLt NameLoad NameLoad body Return Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Return BinOpPow Num Call NameLoad BinOpAdd NameLoad IfExp CompareGt BinOpMod NameLoad Num NameLoad Num Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num body Expr Str Assert CompareIn NameLoad NameLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad If CompareEq NameLoad Num body Assign NameStore Num orelse Assign NameStore BinOpPow Num Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpDiv BinOpMult NameLoad Num NameLoad Num Assign NameStore Dict For NameStore AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad If BoolOpOr NameLoad CompareEq NameLoad Num body Return NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpMult BinOpDiv Call NameLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Num If NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body AugAssignAdd NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore NameLoad If CompareEq NameLoad Num body If CompareEq BinOpAdd Call NameLoad NameLoad NameLoad Num body Return NameLoad Assign NameStore BinOpDiv NameLoad BinOpAdd Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Num orelse Assign NameStore Call NameLoad NameLoad Call NameLoad BinOpDiv NameLoad NameLoad Assign NameStore BinOpDiv BinOpSub NameLoad BinOpMult NameLoad NameLoad NameLoad If CompareLt NameLoad Num body Assign NameStore Num Assign NameStore Dict Str Call NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad BinOpMult AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list
N/A N/A Ceph utils N/A collections N/A math N/A PG_COPY_PER_OSD 200 N/A Pool N/A N/A collections namedtuple Pool N/A name weight LargePools N/A object N/A N/A cinder_volume N/A Pool volumes 16 N/A compute N/A Pool compute 8 N/A cinder_backup N/A Pool backups 4 N/A rgw N/A Pool .rgw 4 N/A glance N/A Pool images 1 N/A all_pools N/A cinder_volume cinder_backup rgw compute glance N/A N/A SMALL_RGW_POOL_COUNT N/A firefly hammer 4 12 to_upper_power_two N/A N/A val threshold N/A 0.01 N/A N/A round to next 2**X integer

    closest upper integer, which is power of two, treshold is for tolerating
    float errors
     N/A N/A val threshold N/A N/A 0 N/A val_log2 N/A N/A math log val 2 N/A N/A 2 N/A int N/A val_log2 N/A N/A N/A val_log2 1 threshold 1 0 N/A get_pool_pg_count N/A N/A osd_num pool_sz ceph_version volumes_ceph objects_ceph ephemeral_ceph images_ceph pg_per_osd emulate_pre_7_0 minimal_pg_count N/A PG_COPY_PER_OSD False 64 N/A N/A calculate pg count for pools

    parametes:
        osd_num: int - OSD count
        pool_sz: int - pool size
        ceph_version:str - target ceph version - ["firefly","hammer"]
        volumes_ceph:bool - cinder volumes would be provided by ceph
        objects_ceph:bool - object storage would be provided by ceph
        ephemeral_ceph:bool - ephemeral disks would be provided by ceph
        images_ceph:bool - glance images storage would be provided by ceph
        pg_per_osd:int, default 200 - lower boundry of PG per OSD
        emulate_pre_7_0: bool, default False - simulate 6.1 behavoir
        minimal_pg_count: int, default 64 - minimal amout of PG per pool

    returns dictionary {pool_name: pool_pg_count}, with additional key -
    default_pg_num - default PG count for all pools, not in result
     N/A N/A ceph_version SMALL_RGW_POOL_COUNT N/A N/A Unknown ceph version: {0}. Only {1} is supported format ceph_version N/A N/A ,  join SMALL_RGW_POOL_COUNT N/A N/A osd_num 0 N/A N/A pre_7_0_pg_num 128 N/A N/A pre_7_0_pg_num N/A 2 N/A int N/A N/A math ceil N/A N/A math log N/A N/A osd_num 100.0 pool_sz 2 N/A res N/A N/A pool N/A LargePools all_pools N/A N/A N/A res N/A N/A pool name N/A int pre_7_0_pg_num N/A N/A res N/A default_pg_num N/A int pre_7_0_pg_num N/A N/A emulate_pre_7_0 N/A osd_num 0 N/A N/A res N/A osd_num N/A float osd_num N/A total_pg_count N/A N/A N/A float pg_per_osd pool_sz osd_num N/A large_pools N/A N/A small_pool_count 0 N/A volumes_ceph N/A N/A N/A N/A large_pools append N/A LargePools cinder_volume N/A N/A N/A large_pools append N/A LargePools cinder_backup N/A objects_ceph N/A N/A small_pool_count N/A SMALL_RGW_POOL_COUNT N/A ceph_version N/A N/A N/A large_pools append N/A LargePools rgw N/A ephemeral_ceph N/A N/A N/A N/A large_pools append N/A LargePools compute N/A images_ceph N/A N/A N/A N/A large_pools append N/A LargePools glance N/A total_weight N/A sum N/A N/A pool weight N/A pool large_pools N/A N/A total_weight 0 N/A N/A N/A N/A N/A len large_pools small_pool_count 0 N/A N/A res N/A default_pg_count N/A total_pg_count N/A N/A len large_pools small_pool_count N/A default_pg_count N/A max minimal_pg_count N/A to_upper_power_two default_pg_count N/A pg_per_weight 0 N/A N/A default_pg_count N/A max minimal_pg_count N/A to_upper_power_two N/A osd_num pool_sz N/A pg_per_weight N/A N/A total_pg_count N/A default_pg_count small_pool_count total_weight N/A N/A pg_per_weight 0 N/A N/A pg_per_weight 0 N/A res N/A default_pg_num N/A int default_pg_count N/A pool large_pools N/A N/A calc_pg N/A to_upper_power_two N/A N/A pool weight pg_per_weight N/A N/A res N/A N/A pool name N/A int N/A max calc_pg default_pg_count N/A pool N/A LargePools all_pools N/A N/A N/A N/A res setdefault N/A pool name N/A int default_pg_count N/A res N/A