Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create deployment space with default params #22

Open
jsaed opened this issue Jan 31, 2022 · 2 comments
Open

create deployment space with default params #22

jsaed opened this issue Jan 31, 2022 · 2 comments

Comments

@jsaed
Copy link

jsaed commented Jan 31, 2022

if action == "create":

        if action == "create":
            infos = terraform_output()

            if len(args) == 2:
                space_name = args[1]
                space = create_deployment_space(
                    client,
                    infos["cos_crn"],
                    infos["wml_name"],
                    infos["wml_crn"],
                    space_name,
                )

            elif len(args) > 2:
                space_name = args[1]
                description = args[2]
                space = create_deployment_space(
                    client,
                    infos["cos_crn"],
                    infos["wml_name"],
                    infos["wml_crn"],
                    space_name,
                    description,
                )

            space = create_deployment_space(
                client,
                infos["cos_crn"],
                infos["wml_name"],
                infos["wml_crn"]
            )
            pprint(space)
@arthurolga
Copy link
Contributor

arthurolga commented Jan 31, 2022

Hello @jsaed, thank for your contribution. I this case, when len(ars) >= 2 create_deployment_space would run twice.

if action == "create":
            infos = terraform_output()

            if len(args) == 2:
                # Space Name only
                space_name = args[1]
                space = create_deployment_space(
                    client,
                    infos["cos_crn"],
                    infos["wml_name"],
                    infos["wml_crn"],
                    space_name,
                )

            elif len(args) > 2:
                # Space Name and Description
                space_name = args[1]
                description = args[2]
                space = create_deployment_space(
                    client,
                    infos["cos_crn"],
                    infos["wml_name"],
                    infos["wml_crn"],
                    space_name,
                    description,
                )
           elif (len(ars)) < 2:
              # Default params
              space = create_deployment_space(
                  client,
                  infos["cos_crn"],
                  infos["wml_name"],
                  infos["wml_crn"]
              )
            pprint(space)

@jsaed
Copy link
Author

jsaed commented Jan 31, 2022

thanks @arthurolga - ok looks good
please add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants