Skip to content
Permalink
Browse files

wip bridged

  • Loading branch information...
dmitriy kalinin
dmitriy kalinin committed Nov 1, 2017
1 parent 7bc49d8 commit cb5fcaa195bf0583734e2fff39b5f8f9a1e199bb
@@ -22,6 +22,9 @@ func (h Host) FindNetwork(net Network) (bnet.Network, error) {
case bnet.HostOnlyType:
return newHostNetwork(net, hostOnlysAdapter{h.networks}).Find()

case bnet.BridgedType:
return newHostNetwork(net, hostOnlysAdapter{h.networks}).Find()

default:
return nil, fmt.Errorf("Unknown network type: %s", net.CloudPropertyType())
}
@@ -45,6 +48,9 @@ func (h Host) EnableNetworks(nets Networks) error {
return err
}

case bnet.BridgedType:
// do nothing

default:
return fmt.Errorf("Unknown network type: %s", net.CloudPropertyType())
}
@@ -8,6 +8,7 @@ const (
NATType = "nat"
NATNetworkType = "natnetwork"
HostOnlyType = "hostonly"
BridgedType = "bridged"
)

type Network interface {
@@ -68,6 +68,9 @@ func (n NICs) addNIC(nic string, net Network, host Host) (string, error) {
}
args = append(args, []string{"hostonly", "--hostonlyadapter" + nic, actualNet.Name()}...)

case bnet.BridgedType:
args = append(args, []string{"bridged", "--bridgeadapter" + nic, net.CloudPropertyName()}...)

default:
return "", bosherr.Errorf("Unknown network type: %s", net.CloudPropertyType())
}

0 comments on commit cb5fcaa

Please sign in to comment.
You can’t perform that action at this time.