Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohann0617 committed Dec 21, 2024
1 parent 0649139 commit ebf923e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@ private List<AvailabilityDomain> getAvailabilityDomains(
return listAvailabilityDomainsResponse.getItems();
}

public List<AvailabilityDomain> getAvailabilityDomains() {
ListAvailabilityDomainsResponse listAvailabilityDomainsResponse =
identityClient.listAvailabilityDomains(ListAvailabilityDomainsRequest.builder()
.compartmentId(compartmentId)
.build());
return listAvailabilityDomainsResponse.getItems();
}

private List<Shape> getShape(
ComputeClient computeClient,
String compartmentId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void addCfg(AddCfgParams params) {
.build())
.build();
try (OracleInstanceFetcher ociFetcher = new OracleInstanceFetcher(sysUserDTO)) {
ociFetcher.listInstances();
ociFetcher.getAvailabilityDomains();
} catch (Exception e) {
log.error("配置:[{}] ,区域:[{}] ,不生效,错误信息:[{}]",
ociUser.getUsername(), ociUser.getOciRegion(), e.getLocalizedMessage());
Expand Down Expand Up @@ -332,7 +332,7 @@ public void uploadCfg(UploadCfgParams params) {
.build())
.build();
try (OracleInstanceFetcher ociFetcher = new OracleInstanceFetcher(sysUserDTO)) {
ociFetcher.listInstances();
ociFetcher.getAvailabilityDomains();
} catch (Exception e) {
log.error("配置:[{}] ,区域:[{}] 不生效,请检查密钥与配置项是否准确无误,错误信息:{}",
ociUser.getUsername(), ociUser.getOciRegion(), e.getLocalizedMessage());
Expand Down

0 comments on commit ebf923e

Please sign in to comment.