fix(core): update
This commit is contained in:
parent
0b3e3b68c9
commit
71c89ac9bc
@ -26,7 +26,8 @@ tap.test('should list networks', async () => {
|
|||||||
|
|
||||||
tap.test('should create a network', async () => {
|
tap.test('should create a network', async () => {
|
||||||
const newNetwork = await docker.DockerNetwork.createNetwork(testDockerHost, {
|
const newNetwork = await docker.DockerNetwork.createNetwork(testDockerHost, {
|
||||||
Name: 'webgateway'
|
Name: 'webgateway',
|
||||||
|
NetworkNumber: 10
|
||||||
});
|
});
|
||||||
expect(newNetwork).to.be.instanceOf(docker.DockerNetwork);
|
expect(newNetwork).to.be.instanceOf(docker.DockerNetwork);
|
||||||
expect(newNetwork.Name).to.equal('webgateway');
|
expect(newNetwork.Name).to.equal('webgateway');
|
||||||
@ -84,7 +85,8 @@ tap.test('should list all services', async tools => {
|
|||||||
|
|
||||||
tap.test('should create a service', async () => {
|
tap.test('should create a service', async () => {
|
||||||
const testNetwork = await docker.DockerNetwork.createNetwork(testDockerHost, {
|
const testNetwork = await docker.DockerNetwork.createNetwork(testDockerHost, {
|
||||||
Name: 'testNetwork'
|
Name: 'testNetwork',
|
||||||
|
NetworkNumber: 11
|
||||||
});
|
});
|
||||||
const testSecret = await docker.DockerSecret.createSecret(testDockerHost, {
|
const testSecret = await docker.DockerSecret.createSecret(testDockerHost, {
|
||||||
name: 'testSecret',
|
name: 'testSecret',
|
||||||
|
@ -29,7 +29,17 @@ export class DockerNetwork {
|
|||||||
Name: networkCreationDescriptor.Name,
|
Name: networkCreationDescriptor.Name,
|
||||||
CheckDuplicate: true,
|
CheckDuplicate: true,
|
||||||
Driver: 'overlay',
|
Driver: 'overlay',
|
||||||
EnableIPv6: false,
|
EnableIPv6: true,
|
||||||
|
IPAM: {
|
||||||
|
Driver: 'default',
|
||||||
|
Config: [
|
||||||
|
{
|
||||||
|
Subnet: `172.20.${networkCreationDescriptor.NetworkNumber}.0/16`,
|
||||||
|
IPRange: `172.20.${networkCreationDescriptor.NetworkNumber}.0/24`,
|
||||||
|
Gateway: `172.20.${networkCreationDescriptor.NetworkNumber}.11`
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
Internal: true,
|
Internal: true,
|
||||||
Attachable: true,
|
Attachable: true,
|
||||||
Ingress: false
|
Ingress: false
|
||||||
|
@ -3,4 +3,5 @@
|
|||||||
*/
|
*/
|
||||||
export interface INetworkCreationDescriptor {
|
export interface INetworkCreationDescriptor {
|
||||||
Name: string;
|
Name: string;
|
||||||
|
NetworkNumber: number;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user