launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/provider/joyent/instance_firewall.go (about)

     1  // Copyright 2013 Joyent Inc.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package joyent
     5  
     6  import (
     7  	"launchpad.net/juju-core/instance"
     8  )
     9  
    10  // Implementing the methods below (to do something other than return nil) will
    11  // cause `juju expose` to work when the firewall-mode is "instance". If you
    12  // implement one of them, you should implement them all.
    13  
    14  func (inst *environInstance) OpenPorts(machineId string, ports []instance.Port) error {
    15  	logger.Warningf("pretending to open ports %v for instance %q", ports, inst.id)
    16  	return nil
    17  }
    18  
    19  func (inst *environInstance) ClosePorts(machineId string, ports []instance.Port) error {
    20  	logger.Warningf("pretending to close ports %v for instance %q", ports, inst.id)
    21  	return nil
    22  }
    23  
    24  func (inst *environInstance) Ports(machineId string) ([]instance.Port, error) {
    25  	return nil, nil
    26  }