launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #15476
[Merge] lp:~rvb/gomaasapi/fix-breakage into lp:gomaasapi
Raphaël Badin has proposed merging lp:~rvb/gomaasapi/fix-breakage into lp:gomaasapi.
Commit message:
Fix live_example.go. NewAuthenticatedClient now takes 3 arguments.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~rvb/gomaasapi/fix-breakage/+merge/158600
--
https://code.launchpad.net/~rvb/gomaasapi/fix-breakage/+merge/158600
Your team MAAS Maintainers is requested to review the proposed merge of lp:~rvb/gomaasapi/fix-breakage into lp:gomaasapi.
=== modified file 'example/live_example.go'
--- example/live_example.go 2013-02-14 16:36:01 +0000
+++ example/live_example.go 2013-04-12 12:57:27 +0000
@@ -17,6 +17,7 @@
var apiKey string
var apiURL string
+var apiVersion string
func getParams() {
fmt.Println("Warning: this will create a node on the MAAS server; it should be deleted at the end of the run but if something goes wrong, that test node might be left over. You've been warned.")
@@ -30,6 +31,12 @@
if err != nil {
panic(err)
}
+
+ fmt.Print("Enter API version: ")
+ _, err = fmt.Scanf("%s", &apiVersion)
+ if err != nil {
+ panic(err)
+ }
}
func checkError(err error) {
@@ -42,7 +49,7 @@
getParams()
// Create API server endpoint.
- authClient, err := gomaasapi.NewAuthenticatedClient(apiURL, apiKey)
+ authClient, err := gomaasapi.NewAuthenticatedClient(apiURL, apiKey, apiVersion)
checkError(err)
maas := gomaasapi.NewMAAS(*authClient)