Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ugo-emekauwa authored Dec 7, 2022
1 parent 38879b2 commit c438e15
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions src/pool_makers/iqn_pool_maker/iqn_pool_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def intersight_object_moid_retriever(intersight_api_key_id,
provided_organization_moid = intersight_object_moid_retriever(intersight_api_key_id=None,
intersight_api_key=None,
object_name=organization,
intersight_api_path="organization/Organizations",
intersight_api_path="organization/Organizations?$top=1000",
object_type="Organization",
preconfigured_api_client=api_client
)
Expand Down Expand Up @@ -468,7 +468,7 @@ def _post_intersight_object(self):
existing_intersight_object_moid = intersight_object_moid_retriever(intersight_api_key_id=None,
intersight_api_key=None,
object_name=existing_intersight_object_name,
intersight_api_path=self.intersight_api_path,
intersight_api_path=f"{self.intersight_api_path}?$top=1000",
object_type=self.object_type,
preconfigured_api_client=self.api_client
)
Expand Down Expand Up @@ -519,7 +519,7 @@ def _update_api_body_general_attributes(self):
pool_organization_moid = intersight_object_moid_retriever(intersight_api_key_id=None,
intersight_api_key=None,
object_name=self.organization,
intersight_api_path="organization/Organizations",
intersight_api_path="organization/Organizations?$top=1000",
object_type="Organization",
preconfigured_api_client=self.api_client
)
Expand Down Expand Up @@ -872,18 +872,19 @@ def __repr__(self):
)


def iqn_pool_maker(intersight_api_key_id,
intersight_api_key,
pool_name,
iqn_blocks_list=None,
iqn_prefix="iqn.1987-05.com.cisco",
pool_description="",
pool_assignment_order="default",
organization="default",
intersight_base_url="https://www.intersight.com/api/v1",
tags=None,
preconfigured_api_client=None
):
def iqn_pool_maker(
intersight_api_key_id,
intersight_api_key,
pool_name,
iqn_blocks_list=None,
iqn_prefix="iqn.1987-05.com.cisco",
pool_description="",
pool_assignment_order="default",
organization="default",
intersight_base_url="https://www.intersight.com/api/v1",
tags=None,
preconfigured_api_client=None
):
"""This is a function used to make an IQN Pool on Cisco Intersight.
Args:
Expand Down Expand Up @@ -967,18 +968,20 @@ def builder(target_object):
traceback.print_exc()

# Define and create IQN Pool object in Intersight
builder(IqnPool(intersight_api_key_id=intersight_api_key_id,
intersight_api_key=intersight_api_key,
pool_name=pool_name,
pool_description=pool_description,
pool_assignment_order=pool_assignment_order,
organization=organization,
intersight_base_url=intersight_base_url,
tags=tags,
preconfigured_api_client=preconfigured_api_client,
iqn_blocks_list=iqn_blocks_list,
iqn_prefix=iqn_prefix
))
builder(
IqnPool(
intersight_api_key_id=intersight_api_key_id,
intersight_api_key=intersight_api_key,
pool_name=pool_name,
pool_description=pool_description,
pool_assignment_order=pool_assignment_order,
organization=organization,
intersight_base_url=intersight_base_url,
tags=tags,
preconfigured_api_client=preconfigured_api_client,
iqn_blocks_list=iqn_blocks_list,
iqn_prefix=iqn_prefix
))


def main():
Expand Down

0 comments on commit c438e15

Please sign in to comment.