From 3dd116fede13f299aa824222f54d4bee07248c01 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Fri, 20 Jan 2017 12:53:19 -0500 Subject: [PATCH] Add missing network.internal. Signed-off-by: Daniel Nephin --- compose/convert/compose.go | 7 ++++--- compose/schema/data/config_schema_v3.0.json | 1 + compose/types/types.go | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/compose/convert/compose.go b/compose/convert/compose.go index 70c1762a48..532f4c4b29 100644 --- a/compose/convert/compose.go +++ b/compose/convert/compose.go @@ -58,9 +58,10 @@ func Networks(namespace Namespace, networks networkMap, servicesNetworks map[str } createOpts := types.NetworkCreate{ - Labels: AddStackLabel(namespace, network.Labels), - Driver: network.Driver, - Options: network.DriverOpts, + Labels: AddStackLabel(namespace, network.Labels), + Driver: network.Driver, + Options: network.DriverOpts, + Internal: network.Internal, } if network.Ipam.Driver != "" || len(network.Ipam.Config) > 0 { diff --git a/compose/schema/data/config_schema_v3.0.json b/compose/schema/data/config_schema_v3.0.json index 584b6ef5d8..fbcd8bb859 100644 --- a/compose/schema/data/config_schema_v3.0.json +++ b/compose/schema/data/config_schema_v3.0.json @@ -308,6 +308,7 @@ }, "additionalProperties": false }, + "internal": {"type": "boolean"}, "labels": {"$ref": "#/definitions/list_or_dict"} }, "additionalProperties": false diff --git a/compose/types/types.go b/compose/types/types.go index 393bee2f8a..3f2f038834 100644 --- a/compose/types/types.go +++ b/compose/types/types.go @@ -204,6 +204,7 @@ type NetworkConfig struct { DriverOpts map[string]string `mapstructure:"driver_opts"` Ipam IPAMConfig External External + Internal bool Labels map[string]string `compose:"list_or_dict_equals"` }