BREAKING CHANGE(DockerHost): Rename array-returning get* methods to list* on DockerHost and related resource classes; update docs, tests and changelog
This commit is contained in:
@@ -129,7 +129,7 @@ export class DockerNetwork extends DockerResource {
|
||||
);
|
||||
}
|
||||
|
||||
public async getContainersOnNetwork(): Promise<
|
||||
public async listContainersOnNetwork(): Promise<
|
||||
Array<{
|
||||
Name: string;
|
||||
EndpointID: string;
|
||||
@@ -151,7 +151,7 @@ export class DockerNetwork extends DockerResource {
|
||||
}
|
||||
|
||||
public async getContainersOnNetworkForService(serviceArg: DockerService) {
|
||||
const containersOnNetwork = await this.getContainersOnNetwork();
|
||||
const containersOnNetwork = await this.listContainersOnNetwork();
|
||||
const containersOfService = containersOnNetwork.filter((container) => {
|
||||
return container.Name.startsWith(serviceArg.Spec.Name);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user