/
environ_network.go
41 lines (34 loc) · 1.49 KB
/
environ_network.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright 2015 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package vsphere
import (
"github.com/juju/errors"
"github.com/juju/juju/core/instance"
"github.com/juju/juju/core/network"
"github.com/juju/juju/core/network/firewall"
"github.com/juju/juju/environs"
"github.com/juju/juju/environs/context"
)
// OpenPorts is part of the environs.Firewaller interface.
func (*environ) OpenPorts(_ firewall.IngressRules) error {
return errors.Trace(errors.NotSupportedf("ClosePorts"))
}
// ClosePorts is part of the environs.Firewaller interface.
func (*environ) ClosePorts(_ firewall.IngressRules) error {
return errors.Trace(errors.NotSupportedf("ClosePorts"))
}
// IngressRules is part of the environs.Firewaller interface.
func (*environ) IngressRules() (firewall.IngressRules, error) {
return nil, errors.Trace(errors.NotSupportedf("Ports"))
}
// NetworkInterfaces exists only to satisfy the Environ indirection of the
// instance-poller worker.
// Without this method the worker throws an error, which prevents the status of
// instances being known.
// The provider does not support the AllocatePublicIP constraint, which means
// we can assume that the network configuration returned by the machine agent
// represents the knowable link-layer data for each VM - there is no
// elaboration available from the provider.
func (env *environ) NetworkInterfaces(_ context.ProviderCallContext, _ []instance.Id) ([]network.InterfaceInfos, error) {
return nil, environs.ErrNoInstances
}