vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537055 additions and 189679 deletions
+51 -8
View File
@@ -14,9 +14,8 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@@ -25,7 +24,7 @@ import (
"net/http"
)
// UsageClient is the the Compute Management Client.
// UsageClient is the compute Client
type UsageClient struct {
ManagementClient
}
@@ -40,9 +39,8 @@ func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClien
return UsageClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List gets, for the specified location, the current compute resource usage
// information as well as the limits for compute resources under the
// subscription.
// List gets, for the specified location, the current compute resource usage information as well as the limits for
// compute resources under the subscription.
//
// location is the location for which resource usage is queried.
func (client UsageClient) List(location string) (result ListUsagesResult, err error) {
@@ -80,7 +78,7 @@ func (client UsageClient) ListPreparer(location string) (*http.Request, error) {
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -135,3 +133,48 @@ func (client UsageClient) ListNextResults(lastResults ListUsagesResult) (result
return
}
// ListComplete gets all elements from the list without paging.
func (client UsageClient) ListComplete(location string, cancel <-chan struct{}) (<-chan Usage, <-chan error) {
resultChan := make(chan Usage)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(location)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}