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

Refactor Region service #12

Merged
merged 17 commits into from
Dec 11, 2024
Merged

Refactor Region service #12

merged 17 commits into from
Dec 11, 2024

Conversation

lhhyung
Copy link
Member

@lhhyung lhhyung commented Dec 10, 2024

Category

  • New feature
  • Bug fix
  • Improvement
  • Refactor
  • etc

Description

Refactor Region service

Known issue

@lhhyung lhhyung self-assigned this Dec 10, 2024
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'


class RegionUpdateRequest(BaseModel):
region_id: str
name: str = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is optional. As our convention, it is recommended that it be of type Union[str, None].

)
def update(self, params: dict) -> Region:
@change_value_by_rule("APPEND", "workspace_id", "*")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I misinformed you; this decorator should only be used in the read operation.

Suggested change
@change_value_by_rule("APPEND", "workspace_id", "*")

'name': 'str', # required
'region_code': 'str', # required
'provider': 'str', # required
'region_id': 'str,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

region_id field has been removed from the RegionCreateRequest.


return self.create_resource(params)
# return self.create_resource(params)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# return self.create_resource(params)

if isinstance(params["tags"], list):
params["tags"] = utils.tags_to_dict(params["tags"])

identity_mgr = IdentityManager()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
identity_mgr = IdentityManager()

)
def delete(self, params: dict) -> None:
@change_value_by_rule("APPEND", "workspace_id", "*")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@change_value_by_rule("APPEND", "workspace_id", "*")

region_id: str
name: str = None
tags: Union[dict, None] = None
workspace_id: Union[list, str, None] = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
workspace_id: Union[list, str, None] = None
workspace_id: Union[str, None] = None


class RegionDeleteRequest(BaseModel):
region_id: str
workspace_id: Union[list, str, None] = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
workspace_id: Union[list, str, None] = None
workspace_id: Union[str, None] = None

Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link
Member

@ImMin5 ImMin5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lhhyung lhhyung merged commit 3edf832 into cloudforet-io:master Dec 11, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants