Skip to content

Commit 9a4244e

Browse files
committed
Switch internal network lookups to NetworkResource
1 parent e7c3c51 commit 9a4244e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/Services/ContainerAPIService/Client/Utility.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public struct Utility {
215215
networks: parsedNetworks
216216
)
217217
for attachmentConfiguration in config.networks {
218-
let network = try await networkClient.get(id: attachmentConfiguration.network)
218+
let network = try await networkClient.getResource(id: attachmentConfiguration.network)
219219
guard network.status.phase == "running" else {
220220
throw ContainerizationError(.invalidState, message: "network \(attachmentConfiguration.network) is not running")
221221
}

Sources/Services/ContainerSandboxService/Server/SandboxService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ public actor SandboxService {
925925
private func getDefaultNameservers(allocatedAttachments: [AllocatedAttachment]) async throws -> [String] {
926926
let networkClient = NetworkClient()
927927
for allocatedAttach in allocatedAttachments {
928-
let state = try await networkClient.get(id: allocatedAttach.attachment.network)
928+
let state = try await networkClient.getResource(id: allocatedAttach.attachment.network)
929929
guard state.status.phase == "running", let gateway = state.status.ipv4Gateway else {
930930
continue
931931
}

0 commit comments

Comments
 (0)