Skip to content

Prevent deletion of obj in use - #946

Merged
seokho-son merged 1 commit into
cloud-barista:mainfrom
jihoon-seo:211109_Prevent_deletion_of_obj_in_use
Nov 9, 2021
Merged

seokho-son merged 1 commit into
cloud-barista:mainfrom
jihoon-seo:211109_Prevent_deletion_of_obj_in_use

Conversation

@jihoon-seo

Copy link
Copy Markdown
Member

이 PR로 인해, DelAllResources 호출 시 다음과 같이 동작합니다.

  1. resourceType (예: vNet) 에 대해 resourceIdList 추출
  2. resourceIdList 의 각 v (예: vnet-01) 에 대해,
  3. GetAssociatedObjectList 조회하고,
    1. 없으면 DelResource 호출
      1. DelResource 함수 안에서 GetAssociatedObjectList 조회

즉, DelAllResources 함수에서 3. GetAssociatedObjectList 조회하고, 와
a. DelResource 함수 안에서 GetAssociatedObjectList 조회 가 중복입니다.

Optional: DelAllResources 함수에서 3. GetAssociatedObjectList 조회하고, 를 삭제할 수도 있겠습니다. 😊

@jihoon-seo
jihoon-seo requested a review from seokho-son November 9, 2021 07:27
@seokho-son

Copy link
Copy Markdown
Member

@jihoon-seo 감사합니다~~ deleteAll 에서 해당 delete 함수의 기능을 가져와서 사용하도록 하는게 맞겠네요.. ^^
해당 PR을 머지한 후에 핫픽스하면 될 것 같습니다.. ^^

@seokho-son
seokho-son merged commit 38d7231 into cloud-barista:main Nov 9, 2021
@jihoon-seo
jihoon-seo deleted the 211109_Prevent_deletion_of_obj_in_use branch November 10, 2021 03:02
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

Successfully merging this pull request may close these issues.

Apply PR #944 to DelResource() too

2 participants