add stubbed out steps

This commit is contained in:
Megan Marsh 2018-01-12 16:06:03 -08:00 committed by Matthew Hooker
parent 967b858fc3
commit 75ee66f934
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
3 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,24 @@
package classic
import (
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
)
type stepCreateIPReservation struct{}
func (s *stepCreateIPReservation) Run(state multistep.StateBag) multistep.StepAction {
ui := state.Get("ui").(packer.Ui)
ui.Say("Creating IP reservation...")
const endpoint_path = "/ip/reservation/" // POST
// $ opc compute ip-reservations add \
// /Compute-mydomain/user@example.com/master-instance-ip \
// /oracle/public/ippool
// account /Compute-mydomain/default
// ip 129.144.27.172
// name /Compute-mydomain/user@example.com/master-instance-ip
// ...
}

View File

@ -0,0 +1,34 @@
package classic
import (
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
)
type stepCreateIPReservation struct{}
func (s *stepCreateIPReservation) Run(state multistep.StateBag) multistep.StepAction {
ui := state.Get("ui").(packer.Ui)
ui.Say("Creating Instance...")
const endpoint_path = "/launchplan/" // POST
// master-instance.json
// {
// "instances": [{
// "shape": "oc3",
// "sshkeys": ["/Compute-mydomain/user@example.com/my_sshkey"],
// "name": "Compute-mydomain/user@example.com/master-instance",
// "label": "master-instance",
// "imagelist": "/Compute-mydomain/user@example.com/Ubuntu.16.04-LTS.amd64.20170330",
// "networking": {
// "eth0": {
// "nat": "ipreservation:/Compute-mydomain/user@example.com/master-instance-ip"
// }
// }
// }]
// }
// command line call
// $ opc compute launch-plans add --request-body=./master-instance.json
// ...
}

View File

@ -0,0 +1,24 @@
package classic
import (
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
)
type stepCreateIPReservation struct{}
func (s *stepInstanceInfo) Run(state multistep.StateBag) multistep.StepAction {
ui := state.Get("ui").(packer.Ui)
ui.Say("Getting Instance Info...")
endpoint_path := "/instance/%s", instanceName // GET
// $ opc compute ip-reservations add \
// /Compute-mydomain/user@example.com/master-instance-ip \
// /oracle/public/ippool
// account /Compute-mydomain/default
// ip 129.144.27.172
// name /Compute-mydomain/user@example.com/master-instance-ip
// ...
}