~thumper/juju-core/fix-upstart-start-race

« back to all changes in this revision

Viewing changes to provider/joyent/environ_firewall.go

  • Committer: Tarmac
  • Author(s): Daniele Stroppa
  • Date: 2013-11-21 17:53:05 UTC
  • mfrom: (1953.1.17 juju-core)
  • Revision ID: tarmac-20131121175305-pzsz7j7oitdew42r
[r=gz] provider/joyent: Initial work towards joyent provider

Outline for new backend for running juju on the joyent cloud,
based on the skeleton provider. The gojoyent library will need
to get imported and used in a followup branch for actual use.

R=fwereade, gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 "global". If you
 
12
// implement one of them, you should implement them all.
 
13
 
 
14
func (env *environ) OpenPorts(ports []instance.Port) error {
 
15
        logger.Warningf("pretending to open ports %v for all instances", ports)
 
16
        _ = env.getSnapshot()
 
17
        return nil
 
18
}
 
19
 
 
20
func (env *environ) ClosePorts(ports []instance.Port) error {
 
21
        logger.Warningf("pretending to close ports %v for all instances", ports)
 
22
        _ = env.getSnapshot()
 
23
        return nil
 
24
}
 
25
 
 
26
func (env *environ) Ports() ([]instance.Port, error) {
 
27
        _ = env.getSnapshot()
 
28
        return nil, nil
 
29
}