func (c *NatOutboundCommand) printNatScripts(pending []natcmd.UnitContainment) { for _, uc := range pending { fmt.Printf("%s:\n", uc.GatewayMachine.Id) natcmd.WriteScriptStart(os.Stdout) natcmd.WriteScriptOutbound(os.Stdout, uc) fmt.Fprintln(os.Stdout) } }
func (c *NatOutboundCommand) execNatScripts(pending []natcmd.UnitContainment) { for _, uc := range pending { var natScript bytes.Buffer natcmd.WriteScriptStart(&natScript) natcmd.WriteScriptOutbound(&natScript, uc) err := c.ExecSsh(uc.GatewayMachine, natScript.String()) if err != nil { log.Println("nat script failed on", uc.GatewayMachine.Id(), ":", err) } } }