This YANG module provides Configuration Rollback operations.
Copyright 2021 Rubicon Communications, LLC.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/operations/netgate-conf-rollback:conf-rollback-cancel" req, _ := http.NewRequest("POST", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
operates on netgate.conf.rollback.ConfRollbackRestartTimer
object (netgate.conf.rollback.confrollbackrestarttimer.Input) |
{- "input": {
- "netgate-conf-rollback:time": {
- "netgate-conf-rollback:minutes": 0
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/operations/netgate-conf-rollback:conf-rollback-show-timer" req, _ := http.NewRequest("POST", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "output": {
- "netgate-conf-rollback:timer-info": {
- "netgate-conf-rollback:is-started": true,
- "netgate-conf-rollback:config-source": {
- "netgate-conf-rollback:running": "string",
- "netgate-conf-rollback:startup": "string",
- "netgate-conf-rollback:filename": "string"
}, - "netgate-conf-rollback:time": {
- "netgate-conf-rollback:seconds": 0,
- "netgate-conf-rollback:minutes": 0
}, - "netgate-conf-rollback:username": "string"
}
}
}
operates on netgate.conf.rollback.ConfRollbackStartTimer
object (netgate.conf.rollback.confrollbackstarttimer.Input) |
{- "input": {
- "netgate-conf-rollback:config-source": {
- "netgate-conf-rollback:running": "string",
- "netgate-conf-rollback:startup": "string",
- "netgate-conf-rollback:filename": "string"
}, - "netgate-conf-rollback:time": {
- "netgate-conf-rollback:minutes": 0
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/operations/netgate-conf-rollback:conf-rollback-trigger" req, _ := http.NewRequest("POST", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }