docker/ts/docker.classes.network.ts

44 lines
1.0 KiB
TypeScript
Raw Normal View History

2019-08-14 12:19:45 +00:00
import * as plugins from './dockersock.plugins';
import * as interfaces from './interfaces';
import { DockerHost } from './docker.classes.host';
2019-08-14 21:21:54 +00:00
export class DockerNetwork {
public static async getNetworks(dockerHost: DockerHost): Promise<DockerNetwork[]> {
const dockerNetworks: DockerNetwork[] = [];
return dockerNetworks;
}
public static async createNetwork(dockerHost: DockerHost, networkCreationDescriptor) {
// TODO: implement create network
}
constructor(dockerNetworkObjectArg: any) {
Object.keys(dockerNetworkObjectArg).forEach(keyArg => {
this[keyArg] = dockerNetworkObjectArg[keyArg];
});
}
public Name: string;
public Id: string;
public Created: string;
public Scope: string;
public Driver: string;
public EnableIPv6: boolean;
public Internal: boolean;
public Attachable: boolean;
public Ingress: false;
public IPAM: {
Driver: "default" | "bridge" | "overlay",
Config: [
{
Subnet: string,
IPRange: string,
Gateway: string
}
]
};
}