-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor Region service #12
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
Conversation
Signed-off-by: lhhyung <lhhyung511@megazone.com>
Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe 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 Git even has a |
Signed-off-by: lhhyung <lhhyung511@megazone.com>
Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe 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 Git even has a |
|
✅ Why it is requiredThe 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 Git even has a |
Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe 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 Git even has a |
Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe 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 Git even has a |
Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe 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 Git even has a |
…e method in Region Service Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe 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 Git even has a |
|
|
||
| class RegionUpdateRequest(BaseModel): | ||
| region_id: str | ||
| name: str = None |
There was a problem hiding this comment.
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].
| role_types=["DOMAIN_ADMIN", "WORKSPACE_OWNER"], | ||
| ) | ||
| def update(self, params: dict) -> Region: | ||
| @change_value_by_rule("APPEND", "workspace_id", "*") |
There was a problem hiding this comment.
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.
| @change_value_by_rule("APPEND", "workspace_id", "*") |
| 'name': 'str', # required | ||
| 'region_code': 'str', # required | ||
| 'provider': 'str', # required | ||
| 'region_id': 'str, |
There was a problem hiding this comment.
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.
| region_vo = self.create_resource(params.dict()) | ||
|
|
||
| return self.create_resource(params) | ||
| # return self.create_resource(params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # return self.create_resource(params) |
| if isinstance(params["tags"], list): | ||
| params["tags"] = utils.tags_to_dict(params["tags"]) | ||
|
|
||
| identity_mgr = IdentityManager() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| identity_mgr = IdentityManager() |
| role_types=["DOMAIN_ADMIN", "WORKSPACE_OWNER"], | ||
| ) | ||
| def delete(self, params: dict) -> None: | ||
| @change_value_by_rule("APPEND", "workspace_id", "*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| workspace_id: Union[list, str, None] = None | |
| workspace_id: Union[str, None] = None |
Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe 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 Git even has a |
…thods Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe 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 Git even has a |
…equest Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe 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 Git even has a |
ImMin5
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Category
Description
Refactor Region service
Known issue