Skip to content

Commit e248d90

Browse files
committed
Refactor args.
1 parent a2938fd commit e248d90

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

admin-cli/src/main/java/cloud/katta/cli/commands/hub/StorageProfileArchive.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ protected void call(final String hubUrl, final String accessToken, final String
4242
final ApiClient apiClient = new ApiClient();
4343
apiClient.setBasePath(hubUrl);
4444
apiClient.addDefaultHeader("Authorization", "Bearer " + accessToken);
45-
call(uuid, apiClient);
45+
call(UUID.fromString(uuid), apiClient);
4646
}
4747

48-
protected void call(final String uuid, final ApiClient apiClient) throws ApiException {
48+
protected void call(final UUID uuid, final ApiClient apiClient) throws ApiException {
4949
final StorageProfileResourceApi storageProfileResourceApi = new StorageProfileResourceApi(apiClient);
5050
call(uuid, storageProfileResourceApi);
5151
}
5252

53-
protected void call(final String uuid, final StorageProfileResourceApi storageProfileResourceApi) throws ApiException {
53+
protected void call(final UUID uuid, final StorageProfileResourceApi storageProfileResourceApi) throws ApiException {
5454
System.out.println("storage profiles:");
5555
System.out.println(storageProfileResourceApi.apiStorageprofileGet(null));
56-
storageProfileResourceApi.apiStorageprofileProfileIdPut(UUID.fromString(uuid), true);
56+
storageProfileResourceApi.apiStorageprofileProfileIdPut(uuid, true);
5757
System.out.println("updated:");
58-
System.out.println(storageProfileResourceApi.apiStorageprofileProfileIdGet(UUID.fromString(uuid)));
58+
System.out.println(storageProfileResourceApi.apiStorageprofileProfileIdGet(uuid));
5959
}
6060
}

admin-cli/src/test/java/cloud/katta/cli/commands/hub/StorageProfileArchiveTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class StorageProfileArchiveTest {
2121
public void testCall() throws ApiException {
2222
final StorageProfileResourceApi proxyMock = Mockito.mock(StorageProfileResourceApi.class);
2323
final UUID vaultId = UUID.randomUUID();
24-
new StorageProfileArchive().call(vaultId.toString(), proxyMock);
24+
new StorageProfileArchive().call(vaultId, proxyMock);
2525
Mockito.verify(proxyMock, times(1)).apiStorageprofileProfileIdPut(vaultId, true);
2626
Mockito.verify(proxyMock, times(1)).apiStorageprofileProfileIdPut(any(), any());
2727
}

0 commit comments

Comments
 (0)