Update go-cloudstack dependency

This commit is contained in:
Sander van Harmelen
2016-04-21 16:57:02 +02:00
parent b53d0d29c8
commit cbea101ecf
65 changed files with 1076 additions and 1017 deletions

View File

@@ -1,5 +1,5 @@
//
// Copyright 2014, Sander van Harmelen
// Copyright 2016, Sander van Harmelen
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -535,12 +535,18 @@ func (s *UserService) NewListUsersParams() *ListUsersParams {
}
// This is a courtesy helper function, which in some cases may not work as expected!
func (s *UserService) GetUserByID(id string) (*User, int, error) {
func (s *UserService) GetUserByID(id string, opts ...OptionFunc) (*User, int, error) {
p := &ListUsersParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
for _, fn := range opts {
if err := fn(s.cs, p); err != nil {
return nil, -1, err
}
}
l, err := s.ListUsers(p)
if err != nil {
if strings.Contains(err.Error(), fmt.Sprintf(