add stubbed out steps
This commit is contained in:
parent
967b858fc3
commit
75ee66f934
|
@ -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
|
||||
// ...
|
||||
|
||||
}
|
|
@ -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
|
||||
// ...
|
||||
|
||||
}
|
|
@ -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
|
||||
// ...
|
||||
|
||||
}
|
Loading…
Reference in New Issue