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
+54 -14
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -34,17 +33,15 @@ func NewArmTemplatesClient(subscriptionID string) ArmTemplatesClient {
return NewArmTemplatesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewArmTemplatesClientWithBaseURI creates an instance of the
// ArmTemplatesClient client.
// NewArmTemplatesClientWithBaseURI creates an instance of the ArmTemplatesClient client.
func NewArmTemplatesClientWithBaseURI(baseURI string, subscriptionID string) ArmTemplatesClient {
return ArmTemplatesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// Get get azure resource manager template.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. artifactSourceName is the name of the artifact source. name is the
// name of the azure Resource Manager template. expand is specify the $expand
// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name
// of the artifact source. name is the name of the azure Resource Manager template. expand is specify the $expand
// query. Example: 'properties($select=displayName)'
func (client ArmTemplatesClient) Get(resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result ArmTemplate, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, artifactSourceName, name, expand)
@@ -115,12 +112,10 @@ func (client ArmTemplatesClient) GetResponder(resp *http.Response) (result ArmTe
// List list azure resource manager templates in a given artifact source.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. artifactSourceName is the name of the artifact source. expand is
// specify the $expand query. Example: 'properties($select=displayName)' filter
// is the filter to apply to the operation. top is the maximum number of
// resources to return from the operation. orderby is the ordering expression
// for the results, using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name
// of the artifact source. expand is specify the $expand query. Example: 'properties($select=displayName)' filter is
// the filter to apply to the operation. top is the maximum number of resources to return from the operation. orderby
// is the ordering expression for the results, using OData notation.
func (client ArmTemplatesClient) List(resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArmTemplate, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby)
if err != nil {
@@ -219,3 +214,48 @@ func (client ArmTemplatesClient) ListNextResults(lastResults ResponseWithContinu
return
}
// ListComplete gets all elements from the list without paging.
func (client ArmTemplatesClient) ListComplete(resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan ArmTemplate, <-chan error) {
resultChan := make(chan ArmTemplate)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby)
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
}
+59 -21
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -34,20 +33,17 @@ func NewArtifactsClient(subscriptionID string) ArtifactsClient {
return NewArtifactsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient
// client.
// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient client.
func NewArtifactsClientWithBaseURI(baseURI string, subscriptionID string) ArtifactsClient {
return ArtifactsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// GenerateArmTemplate generates an ARM template for the given artifact,
// uploads the required files to a storage account, and validates the generated
// artifact.
// GenerateArmTemplate generates an ARM template for the given artifact, uploads the required files to a storage
// account, and validates the generated artifact.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. artifactSourceName is the name of the artifact source. name is the
// name of the artifact. generateArmTemplateRequest is parameters for
// generating an ARM template for deploying artifacts.
// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name
// of the artifact source. name is the name of the artifact. generateArmTemplateRequest is parameters for generating an
// ARM template for deploying artifacts.
func (client ArtifactsClient) GenerateArmTemplate(resourceGroupName string, labName string, artifactSourceName string, name string, generateArmTemplateRequest GenerateArmTemplateRequest) (result ArmTemplateInfo, err error) {
req, err := client.GenerateArmTemplatePreparer(resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest)
if err != nil {
@@ -116,9 +112,8 @@ func (client ArtifactsClient) GenerateArmTemplateResponder(resp *http.Response)
// Get get artifact.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. artifactSourceName is the name of the artifact source. name is the
// name of the artifact. expand is specify the $expand query. Example:
// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name
// of the artifact source. name is the name of the artifact. expand is specify the $expand query. Example:
// 'properties($select=title)'
func (client ArtifactsClient) Get(resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result Artifact, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, artifactSourceName, name, expand)
@@ -189,12 +184,10 @@ func (client ArtifactsClient) GetResponder(resp *http.Response) (result Artifact
// List list artifacts in a given artifact source.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. artifactSourceName is the name of the artifact source. expand is
// specify the $expand query. Example: 'properties($select=title)' filter is
// the filter to apply to the operation. top is the maximum number of resources
// to return from the operation. orderby is the ordering expression for the
// results, using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name
// of the artifact source. expand is specify the $expand query. Example: 'properties($select=title)' filter is the
// filter to apply to the operation. top is the maximum number of resources to return from the operation. orderby is
// the ordering expression for the results, using OData notation.
func (client ArtifactsClient) List(resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArtifact, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby)
if err != nil {
@@ -293,3 +286,48 @@ func (client ArtifactsClient) ListNextResults(lastResults ResponseWithContinuati
return
}
// ListComplete gets all elements from the list without paging.
func (client ArtifactsClient) ListComplete(resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Artifact, <-chan error) {
resultChan := make(chan Artifact)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby)
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
}
+60 -23
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -30,23 +29,20 @@ type ArtifactSourcesClient struct {
ManagementClient
}
// NewArtifactSourcesClient creates an instance of the ArtifactSourcesClient
// client.
// NewArtifactSourcesClient creates an instance of the ArtifactSourcesClient client.
func NewArtifactSourcesClient(subscriptionID string) ArtifactSourcesClient {
return NewArtifactSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewArtifactSourcesClientWithBaseURI creates an instance of the
// ArtifactSourcesClient client.
// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client.
func NewArtifactSourcesClientWithBaseURI(baseURI string, subscriptionID string) ArtifactSourcesClient {
return ArtifactSourcesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing artifact source.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the artifact source. artifactSource is
// properties of an artifact source.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// artifact source. artifactSource is properties of an artifact source.
func (client ArtifactSourcesClient) CreateOrUpdate(resourceGroupName string, labName string, name string, artifactSource ArtifactSource) (result ArtifactSource, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: artifactSource,
@@ -120,8 +116,8 @@ func (client ArtifactSourcesClient) CreateOrUpdateResponder(resp *http.Response)
// Delete delete artifact source.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the artifact source.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// artifact source.
func (client ArtifactSourcesClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, labName, name)
if err != nil {
@@ -186,9 +182,8 @@ func (client ArtifactSourcesClient) DeleteResponder(resp *http.Response) (result
// Get get artifact source.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the artifact source. expand is specify the
// $expand query. Example: 'properties($select=displayName)'
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// artifact source. expand is specify the $expand query. Example: 'properties($select=displayName)'
func (client ArtifactSourcesClient) Get(resourceGroupName string, labName string, name string, expand string) (result ArtifactSource, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
if err != nil {
@@ -257,11 +252,9 @@ func (client ArtifactSourcesClient) GetResponder(resp *http.Response) (result Ar
// List list artifact sources in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. expand is specify the $expand query. Example:
// 'properties($select=displayName)' filter is the filter to apply to the
// operation. top is the maximum number of resources to return from the
// operation. orderby is the ordering expression for the results, using OData
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($select=displayName)' filter is the filter to apply to the operation. top is the maximum
// number of resources to return from the operation. orderby is the ordering expression for the results, using OData
// notation.
func (client ArtifactSourcesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArtifactSource, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
@@ -361,11 +354,55 @@ func (client ArtifactSourcesClient) ListNextResults(lastResults ResponseWithCont
return
}
// ListComplete gets all elements from the list without paging.
func (client ArtifactSourcesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan ArtifactSource, <-chan error) {
resultChan := make(chan ArtifactSource)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
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
}
// Update modify properties of artifact sources.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the artifact source. artifactSource is
// properties of an artifact source.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// artifact source. artifactSource is properties of an artifact source.
func (client ArtifactSourcesClient) Update(resourceGroupName string, labName string, name string, artifactSource ArtifactSourceFragment) (result ArtifactSource, err error) {
req, err := client.UpdatePreparer(resourceGroupName, labName, name, artifactSource)
if err != nil {
+3 -5
View File
@@ -1,5 +1,4 @@
// Package devtestlabs implements the Azure ARM Devtestlabs service API version
// 2016-05-15.
// Package devtestlabs implements the Azure ARM Devtestlabs service API version 2016-05-15.
//
// The DevTest Labs Client.
package devtestlabs
@@ -18,9 +17,8 @@ package devtestlabs
// 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"
+6 -8
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -42,8 +41,8 @@ func NewCostsClientWithBaseURI(baseURI string, subscriptionID string) CostsClien
// CreateOrUpdate create or replace an existing cost.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the cost. labCost is a cost item.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the cost.
// labCost is a cost item.
func (client CostsClient) CreateOrUpdate(resourceGroupName string, labName string, name string, labCost LabCost) (result LabCost, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: labCost,
@@ -117,9 +116,8 @@ func (client CostsClient) CreateOrUpdateResponder(resp *http.Response) (result L
// Get get cost.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the cost. expand is specify the $expand query.
// Example: 'properties($expand=labCostDetails)'
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the cost.
// expand is specify the $expand query. Example: 'properties($expand=labCostDetails)'
func (client CostsClient) Get(resourceGroupName string, labName string, name string, expand string) (result LabCost, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
if err != nil {
+68 -27
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -35,20 +34,17 @@ func NewCustomImagesClient(subscriptionID string) CustomImagesClient {
return NewCustomImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewCustomImagesClientWithBaseURI creates an instance of the
// CustomImagesClient client.
// NewCustomImagesClientWithBaseURI creates an instance of the CustomImagesClient client.
func NewCustomImagesClientWithBaseURI(baseURI string, subscriptionID string) CustomImagesClient {
return CustomImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing custom image. This operation
// can take a while to complete. This method may poll for completion. Polling
// can be canceled by passing the cancel channel argument. The channel will be
// used to cancel polling and any outstanding HTTP requests.
// CreateOrUpdate create or replace an existing custom image. This operation can take a while to complete. This method
// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the custom image. customImage is a custom
// image.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the custom
// image. customImage is a custom image.
func (client CustomImagesClient) CreateOrUpdate(resourceGroupName string, labName string, name string, customImage CustomImage, cancel <-chan struct{}) (<-chan CustomImage, <-chan error) {
resultChan := make(chan CustomImage, 1)
errChan := make(chan error, 1)
@@ -65,8 +61,10 @@ func (client CustomImagesClient) CreateOrUpdate(resourceGroupName string, labNam
var err error
var result CustomImage
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -136,13 +134,12 @@ func (client CustomImagesClient) CreateOrUpdateResponder(resp *http.Response) (r
return
}
// Delete delete custom image. This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Delete delete custom image. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the custom image.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the custom
// image.
func (client CustomImagesClient) Delete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -150,8 +147,10 @@ func (client CustomImagesClient) Delete(resourceGroupName string, labName string
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -220,9 +219,8 @@ func (client CustomImagesClient) DeleteResponder(resp *http.Response) (result au
// Get get custom image.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the custom image. expand is specify the $expand
// query. Example: 'properties($select=vm)'
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the custom
// image. expand is specify the $expand query. Example: 'properties($select=vm)'
func (client CustomImagesClient) Get(resourceGroupName string, labName string, name string, expand string) (result CustomImage, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
if err != nil {
@@ -291,11 +289,9 @@ func (client CustomImagesClient) GetResponder(resp *http.Response) (result Custo
// List list custom images in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. expand is specify the $expand query. Example:
// 'properties($select=vm)' filter is the filter to apply to the operation. top
// is the maximum number of resources to return from the operation. orderby is
// the ordering expression for the results, using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($select=vm)' filter is the filter to apply to the operation. top is the maximum number
// of resources to return from the operation. orderby is the ordering expression for the results, using OData notation.
func (client CustomImagesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationCustomImage, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -393,3 +389,48 @@ func (client CustomImagesClient) ListNextResults(lastResults ResponseWithContinu
return
}
// ListComplete gets all elements from the list without paging.
func (client CustomImagesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan CustomImage, <-chan error) {
resultChan := make(chan CustomImage)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
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
}
+84 -44
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -40,14 +39,12 @@ func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClien
return DisksClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// Attach attach and create the lease of the disk to the virtual machine. This
// operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel
// Attach attach and create the lease of the disk to the virtual machine. This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// disk. attachDiskProperties is properties of the disk to attach.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the disk. attachDiskProperties is properties of the disk to attach.
func (client DisksClient) Attach(resourceGroupName string, labName string, userName string, name string, attachDiskProperties AttachDiskProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -55,8 +52,10 @@ func (client DisksClient) Attach(resourceGroupName string, labName string, userN
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -126,14 +125,12 @@ func (client DisksClient) AttachResponder(resp *http.Response) (result autorest.
return
}
// CreateOrUpdate create or replace an existing disk. This operation can take a
// while to complete. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
// CreateOrUpdate create or replace an existing disk. This operation can take a while to complete. This method may poll
// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// disk. disk is a Disk.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the disk. disk is a Disk.
func (client DisksClient) CreateOrUpdate(resourceGroupName string, labName string, userName string, name string, disk Disk, cancel <-chan struct{}) (<-chan Disk, <-chan error) {
resultChan := make(chan Disk, 1)
errChan := make(chan error, 1)
@@ -150,8 +147,10 @@ func (client DisksClient) CreateOrUpdate(resourceGroupName string, labName strin
var err error
var result Disk
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -222,14 +221,12 @@ func (client DisksClient) CreateOrUpdateResponder(resp *http.Response) (result D
return
}
// Delete delete disk. This operation can take a while to complete. This method
// may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
// Delete delete disk. This operation can take a while to complete. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// disk.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the disk.
func (client DisksClient) Delete(resourceGroupName string, labName string, userName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -237,8 +234,10 @@ func (client DisksClient) Delete(resourceGroupName string, labName string, userN
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -306,15 +305,12 @@ func (client DisksClient) DeleteResponder(resp *http.Response) (result autorest.
return
}
// Detach detach and break the lease of the disk attached to the virtual
// machine. This operation can take a while to complete. This method may poll
// for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding
// HTTP requests.
// Detach detach and break the lease of the disk attached to the virtual machine. This operation can take a while to
// complete. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
// channel will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// disk. detachDiskProperties is properties of the disk to detach.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the disk. detachDiskProperties is properties of the disk to detach.
func (client DisksClient) Detach(resourceGroupName string, labName string, userName string, name string, detachDiskProperties DetachDiskProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -322,8 +318,10 @@ func (client DisksClient) Detach(resourceGroupName string, labName string, userN
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -395,9 +393,8 @@ func (client DisksClient) DetachResponder(resp *http.Response) (result autorest.
// Get get disk.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// disk. expand is specify the $expand query. Example:
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the disk. expand is specify the $expand query. Example:
// 'properties($select=diskType)'
func (client DisksClient) Get(resourceGroupName string, labName string, userName string, name string, expand string) (result Disk, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, userName, name, expand)
@@ -468,12 +465,10 @@ func (client DisksClient) GetResponder(resp *http.Response) (result Disk, err er
// List list disks in a given user profile.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. expand is specify the
// $expand query. Example: 'properties($select=diskType)' filter is the filter
// to apply to the operation. top is the maximum number of resources to return
// from the operation. orderby is the ordering expression for the results,
// using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. expand is specify the $expand query. Example: 'properties($select=diskType)' filter is the filter to
// apply to the operation. top is the maximum number of resources to return from the operation. orderby is the ordering
// expression for the results, using OData notation.
func (client DisksClient) List(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationDisk, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, userName, expand, filter, top, orderby)
if err != nil {
@@ -572,3 +567,48 @@ func (client DisksClient) ListNextResults(lastResults ResponseWithContinuationDi
return
}
// ListComplete gets all elements from the list without paging.
func (client DisksClient) ListComplete(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Disk, <-chan error) {
resultChan := make(chan Disk)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, userName, expand, filter, top, orderby)
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
}
+69 -29
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -35,20 +34,17 @@ func NewEnvironmentsClient(subscriptionID string) EnvironmentsClient {
return NewEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewEnvironmentsClientWithBaseURI creates an instance of the
// EnvironmentsClient client.
// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client.
func NewEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) EnvironmentsClient {
return EnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing environment. This operation can
// take a while to complete. This method may poll for completion. Polling can
// be canceled by passing the cancel channel argument. The channel will be used
// to cancel polling and any outstanding HTTP requests.
// CreateOrUpdate create or replace an existing environment. This operation can take a while to complete. This method
// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// environment. dtlEnvironment is an environment, which is essentially an ARM
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the environment. dtlEnvironment is an environment, which is essentially an ARM
// template deployment.
func (client EnvironmentsClient) CreateOrUpdate(resourceGroupName string, labName string, userName string, name string, dtlEnvironment DtlEnvironment, cancel <-chan struct{}) (<-chan DtlEnvironment, <-chan error) {
resultChan := make(chan DtlEnvironment, 1)
@@ -66,8 +62,10 @@ func (client EnvironmentsClient) CreateOrUpdate(resourceGroupName string, labNam
var err error
var result DtlEnvironment
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -138,14 +136,12 @@ func (client EnvironmentsClient) CreateOrUpdateResponder(resp *http.Response) (r
return
}
// Delete delete environment. This operation can take a while to complete. This
// method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Delete delete environment. This operation can take a while to complete. This method may poll for completion. Polling
// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// environment.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the environment.
func (client EnvironmentsClient) Delete(resourceGroupName string, labName string, userName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -153,8 +149,10 @@ func (client EnvironmentsClient) Delete(resourceGroupName string, labName string
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -224,9 +222,8 @@ func (client EnvironmentsClient) DeleteResponder(resp *http.Response) (result au
// Get get environment.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// environment. expand is specify the $expand query. Example:
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the environment. expand is specify the $expand query. Example:
// 'properties($select=deploymentProperties)'
func (client EnvironmentsClient) Get(resourceGroupName string, labName string, userName string, name string, expand string) (result DtlEnvironment, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, userName, name, expand)
@@ -297,12 +294,10 @@ func (client EnvironmentsClient) GetResponder(resp *http.Response) (result DtlEn
// List list environments in a given user profile.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. expand is specify the
// $expand query. Example: 'properties($select=deploymentProperties)' filter is
// the filter to apply to the operation. top is the maximum number of resources
// to return from the operation. orderby is the ordering expression for the
// results, using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. expand is specify the $expand query. Example: 'properties($select=deploymentProperties)' filter is the
// filter to apply to the operation. top is the maximum number of resources to return from the operation. orderby is
// the ordering expression for the results, using OData notation.
func (client EnvironmentsClient) List(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationDtlEnvironment, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, userName, expand, filter, top, orderby)
if err != nil {
@@ -401,3 +396,48 @@ func (client EnvironmentsClient) ListNextResults(lastResults ResponseWithContinu
return
}
// ListComplete gets all elements from the list without paging.
func (client EnvironmentsClient) ListComplete(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan DtlEnvironment, <-chan error) {
resultChan := make(chan DtlEnvironment)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, userName, expand, filter, top, orderby)
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
}
+63 -23
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -35,20 +34,17 @@ func NewFormulasClient(subscriptionID string) FormulasClient {
return NewFormulasClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewFormulasClientWithBaseURI creates an instance of the FormulasClient
// client.
// NewFormulasClientWithBaseURI creates an instance of the FormulasClient client.
func NewFormulasClientWithBaseURI(baseURI string, subscriptionID string) FormulasClient {
return FormulasClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing Formula. This operation can
// take a while to complete. This method may poll for completion. Polling can
// be canceled by passing the cancel channel argument. The channel will be used
// to cancel polling and any outstanding HTTP requests.
// CreateOrUpdate create or replace an existing Formula. This operation can take a while to complete. This method may
// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the formula. formula is a formula for creating
// a VM, specifying an image base and other parameters
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// formula. formula is a formula for creating a VM, specifying an image base and other parameters
func (client FormulasClient) CreateOrUpdate(resourceGroupName string, labName string, name string, formula Formula, cancel <-chan struct{}) (<-chan Formula, <-chan error) {
resultChan := make(chan Formula, 1)
errChan := make(chan error, 1)
@@ -78,8 +74,10 @@ func (client FormulasClient) CreateOrUpdate(resourceGroupName string, labName st
var err error
var result Formula
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -151,8 +149,8 @@ func (client FormulasClient) CreateOrUpdateResponder(resp *http.Response) (resul
// Delete delete formula.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the formula.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// formula.
func (client FormulasClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, labName, name)
if err != nil {
@@ -217,9 +215,8 @@ func (client FormulasClient) DeleteResponder(resp *http.Response) (result autore
// Get get formula.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the formula. expand is specify the $expand
// query. Example: 'properties($select=description)'
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// formula. expand is specify the $expand query. Example: 'properties($select=description)'
func (client FormulasClient) Get(resourceGroupName string, labName string, name string, expand string) (result Formula, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
if err != nil {
@@ -288,11 +285,9 @@ func (client FormulasClient) GetResponder(resp *http.Response) (result Formula,
// List list formulas in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. expand is specify the $expand query. Example:
// 'properties($select=description)' filter is the filter to apply to the
// operation. top is the maximum number of resources to return from the
// operation. orderby is the ordering expression for the results, using OData
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($select=description)' filter is the filter to apply to the operation. top is the maximum
// number of resources to return from the operation. orderby is the ordering expression for the results, using OData
// notation.
func (client FormulasClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationFormula, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
@@ -391,3 +386,48 @@ func (client FormulasClient) ListNextResults(lastResults ResponseWithContinuatio
return
}
// ListComplete gets all elements from the list without paging.
func (client FormulasClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Formula, <-chan error) {
resultChan := make(chan Formula)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
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
}
+53 -12
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -29,25 +28,22 @@ type GalleryImagesClient struct {
ManagementClient
}
// NewGalleryImagesClient creates an instance of the GalleryImagesClient
// client.
// NewGalleryImagesClient creates an instance of the GalleryImagesClient client.
func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient {
return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewGalleryImagesClientWithBaseURI creates an instance of the
// GalleryImagesClient client.
// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client.
func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient {
return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List list gallery images in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. expand is specify the $expand query. Example:
// 'properties($select=author)' filter is the filter to apply to the operation.
// top is the maximum number of resources to return from the operation. orderby
// is the ordering expression for the results, using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($select=author)' filter is the filter to apply to the operation. top is the maximum
// number of resources to return from the operation. orderby is the ordering expression for the results, using OData
// notation.
func (client GalleryImagesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationGalleryImage, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -145,3 +141,48 @@ func (client GalleryImagesClient) ListNextResults(lastResults ResponseWithContin
return
}
// ListComplete gets all elements from the list without paging.
func (client GalleryImagesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan GalleryImage, <-chan error) {
resultChan := make(chan GalleryImage)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
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
}
+118 -38
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -30,22 +29,19 @@ type GlobalSchedulesClient struct {
ManagementClient
}
// NewGlobalSchedulesClient creates an instance of the GlobalSchedulesClient
// client.
// NewGlobalSchedulesClient creates an instance of the GlobalSchedulesClient client.
func NewGlobalSchedulesClient(subscriptionID string) GlobalSchedulesClient {
return NewGlobalSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewGlobalSchedulesClientWithBaseURI creates an instance of the
// GlobalSchedulesClient client.
// NewGlobalSchedulesClientWithBaseURI creates an instance of the GlobalSchedulesClient client.
func NewGlobalSchedulesClientWithBaseURI(baseURI string, subscriptionID string) GlobalSchedulesClient {
return GlobalSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing schedule.
//
// resourceGroupName is the name of the resource group. name is the name of the
// schedule. schedule is a schedule.
// resourceGroupName is the name of the resource group. name is the name of the schedule. schedule is a schedule.
func (client GlobalSchedulesClient) CreateOrUpdate(resourceGroupName string, name string, schedule Schedule) (result Schedule, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: schedule,
@@ -118,8 +114,7 @@ func (client GlobalSchedulesClient) CreateOrUpdateResponder(resp *http.Response)
// Delete delete schedule.
//
// resourceGroupName is the name of the resource group. name is the name of the
// schedule.
// resourceGroupName is the name of the resource group. name is the name of the schedule.
func (client GlobalSchedulesClient) Delete(resourceGroupName string, name string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, name)
if err != nil {
@@ -181,13 +176,11 @@ func (client GlobalSchedulesClient) DeleteResponder(resp *http.Response) (result
return
}
// Execute execute a schedule. This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Execute execute a schedule. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. name is the name of the
// schedule.
// resourceGroupName is the name of the resource group. name is the name of the schedule.
func (client GlobalSchedulesClient) Execute(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -195,8 +188,10 @@ func (client GlobalSchedulesClient) Execute(resourceGroupName string, name strin
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -264,9 +259,8 @@ func (client GlobalSchedulesClient) ExecuteResponder(resp *http.Response) (resul
// Get get schedule.
//
// resourceGroupName is the name of the resource group. name is the name of the
// schedule. expand is specify the $expand query. Example:
// 'properties($select=status)'
// resourceGroupName is the name of the resource group. name is the name of the schedule. expand is specify the $expand
// query. Example: 'properties($select=status)'
func (client GlobalSchedulesClient) Get(resourceGroupName string, name string, expand string) (result Schedule, err error) {
req, err := client.GetPreparer(resourceGroupName, name, expand)
if err != nil {
@@ -334,11 +328,9 @@ func (client GlobalSchedulesClient) GetResponder(resp *http.Response) (result Sc
// ListByResourceGroup list schedules in a resource group.
//
// resourceGroupName is the name of the resource group. expand is specify the
// $expand query. Example: 'properties($select=status)' filter is the filter to
// apply to the operation. top is the maximum number of resources to return
// from the operation. orderby is the ordering expression for the results,
// using OData notation.
// resourceGroupName is the name of the resource group. expand is specify the $expand query. Example:
// 'properties($select=status)' filter is the filter to apply to the operation. top is the maximum number of resources
// to return from the operation. orderby is the ordering expression for the results, using OData notation.
func (client GlobalSchedulesClient) ListByResourceGroup(resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedule, err error) {
req, err := client.ListByResourceGroupPreparer(resourceGroupName, expand, filter, top, orderby)
if err != nil {
@@ -436,11 +428,55 @@ func (client GlobalSchedulesClient) ListByResourceGroupNextResults(lastResults R
return
}
// ListByResourceGroupComplete gets all elements from the list without paging.
func (client GlobalSchedulesClient) ListByResourceGroupComplete(resourceGroupName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) {
resultChan := make(chan Schedule)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListByResourceGroup(resourceGroupName, expand, filter, top, orderby)
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.ListByResourceGroupNextResults(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
}
// ListBySubscription list schedules in a subscription.
//
// expand is specify the $expand query. Example: 'properties($select=status)'
// filter is the filter to apply to the operation. top is the maximum number of
// resources to return from the operation. orderby is the ordering expression
// expand is specify the $expand query. Example: 'properties($select=status)' filter is the filter to apply to the
// operation. top is the maximum number of resources to return from the operation. orderby is the ordering expression
// for the results, using OData notation.
func (client GlobalSchedulesClient) ListBySubscription(expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedule, err error) {
req, err := client.ListBySubscriptionPreparer(expand, filter, top, orderby)
@@ -538,14 +574,57 @@ func (client GlobalSchedulesClient) ListBySubscriptionNextResults(lastResults Re
return
}
// Retarget updates a schedule's target resource Id. This operation can take a
// while to complete. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
// ListBySubscriptionComplete gets all elements from the list without paging.
func (client GlobalSchedulesClient) ListBySubscriptionComplete(expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) {
resultChan := make(chan Schedule)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListBySubscription(expand, filter, top, orderby)
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.ListBySubscriptionNextResults(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
}
// Retarget updates a schedule's target resource Id. This operation can take a while to complete. This method may poll
// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. name is the name of the
// schedule. retargetScheduleProperties is properties for retargeting a virtual
// machine schedule.
// resourceGroupName is the name of the resource group. name is the name of the schedule. retargetScheduleProperties is
// properties for retargeting a virtual machine schedule.
func (client GlobalSchedulesClient) Retarget(resourceGroupName string, name string, retargetScheduleProperties RetargetScheduleProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -553,8 +632,10 @@ func (client GlobalSchedulesClient) Retarget(resourceGroupName string, name stri
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -624,8 +705,7 @@ func (client GlobalSchedulesClient) RetargetResponder(resp *http.Response) (resu
// Update modify properties of schedules.
//
// resourceGroupName is the name of the resource group. name is the name of the
// schedule. schedule is a schedule.
// resourceGroupName is the name of the resource group. name is the name of the schedule. schedule is a schedule.
func (client GlobalSchedulesClient) Update(resourceGroupName string, name string, schedule ScheduleFragment) (result Schedule, err error) {
req, err := client.UpdatePreparer(resourceGroupName, name, schedule)
if err != nil {
+186 -59
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -40,13 +39,11 @@ func NewLabsClientWithBaseURI(baseURI string, subscriptionID string) LabsClient
return LabsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// ClaimAnyVM claim a random claimable virtual machine in the lab. This
// operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
// ClaimAnyVM claim a random claimable virtual machine in the lab. This operation can take a while to complete. This
// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be
// used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. name is the name of the
// lab.
// resourceGroupName is the name of the resource group. name is the name of the lab.
func (client LabsClient) ClaimAnyVM(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -54,8 +51,10 @@ func (client LabsClient) ClaimAnyVM(resourceGroupName string, name string, cance
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -121,14 +120,12 @@ func (client LabsClient) ClaimAnyVMResponder(resp *http.Response) (result autore
return
}
// CreateEnvironment create virtual machines in a lab. This operation can take
// a while to complete. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// CreateEnvironment create virtual machines in a lab. This operation can take a while to complete. This method may
// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. name is the name of the
// lab. labVirtualMachineCreationParameter is properties for creating a virtual
// machine.
// resourceGroupName is the name of the resource group. name is the name of the lab. labVirtualMachineCreationParameter
// is properties for creating a virtual machine.
func (client LabsClient) CreateEnvironment(resourceGroupName string, name string, labVirtualMachineCreationParameter LabVirtualMachineCreationParameter, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -154,8 +151,10 @@ func (client LabsClient) CreateEnvironment(resourceGroupName string, name string
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -223,13 +222,11 @@ func (client LabsClient) CreateEnvironmentResponder(resp *http.Response) (result
return
}
// CreateOrUpdate create or replace an existing lab. This operation can take a
// while to complete. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
// CreateOrUpdate create or replace an existing lab. This operation can take a while to complete. This method may poll
// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. name is the name of the
// lab. lab is a lab.
// resourceGroupName is the name of the resource group. name is the name of the lab. lab is a lab.
func (client LabsClient) CreateOrUpdate(resourceGroupName string, name string, lab Lab, cancel <-chan struct{}) (<-chan Lab, <-chan error) {
resultChan := make(chan Lab, 1)
errChan := make(chan error, 1)
@@ -237,8 +234,10 @@ func (client LabsClient) CreateOrUpdate(resourceGroupName string, name string, l
var err error
var result Lab
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -307,13 +306,11 @@ func (client LabsClient) CreateOrUpdateResponder(resp *http.Response) (result La
return
}
// Delete delete lab. This operation can take a while to complete. This method
// may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
// Delete delete lab. This operation can take a while to complete. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
//
// resourceGroupName is the name of the resource group. name is the name of the
// lab.
// resourceGroupName is the name of the resource group. name is the name of the lab.
func (client LabsClient) Delete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -321,8 +318,10 @@ func (client LabsClient) Delete(resourceGroupName string, name string, cancel <-
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -388,15 +387,12 @@ func (client LabsClient) DeleteResponder(resp *http.Response) (result autorest.R
return
}
// ExportResourceUsage exports the lab resource usage into a storage account
// This operation can take a while to complete. This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument.
// The channel will be used to cancel polling and any outstanding HTTP
// requests.
// ExportResourceUsage exports the lab resource usage into a storage account This operation can take a while to
// complete. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
// channel will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. name is the name of the
// lab. exportResourceUsageParameters is the parameters of the export
// operation.
// resourceGroupName is the name of the resource group. name is the name of the lab. exportResourceUsageParameters is
// the parameters of the export operation.
func (client LabsClient) ExportResourceUsage(resourceGroupName string, name string, exportResourceUsageParameters ExportResourceUsageParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -404,8 +400,10 @@ func (client LabsClient) ExportResourceUsage(resourceGroupName string, name stri
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -475,8 +473,8 @@ func (client LabsClient) ExportResourceUsageResponder(resp *http.Response) (resu
// GenerateUploadURI generate a URI for uploading custom disk images to a Lab.
//
// resourceGroupName is the name of the resource group. name is the name of the
// lab. generateUploadURIParameter is properties for generating an upload URI.
// resourceGroupName is the name of the resource group. name is the name of the lab. generateUploadURIParameter is
// properties for generating an upload URI.
func (client LabsClient) GenerateUploadURI(resourceGroupName string, name string, generateUploadURIParameter GenerateUploadURIParameter) (result GenerateUploadURIResponse, err error) {
req, err := client.GenerateUploadURIPreparer(resourceGroupName, name, generateUploadURIParameter)
if err != nil {
@@ -543,9 +541,8 @@ func (client LabsClient) GenerateUploadURIResponder(resp *http.Response) (result
// Get get lab.
//
// resourceGroupName is the name of the resource group. name is the name of the
// lab. expand is specify the $expand query. Example:
// 'properties($select=defaultStorageAccount)'
// resourceGroupName is the name of the resource group. name is the name of the lab. expand is specify the $expand
// query. Example: 'properties($select=defaultStorageAccount)'
func (client LabsClient) Get(resourceGroupName string, name string, expand string) (result Lab, err error) {
req, err := client.GetPreparer(resourceGroupName, name, expand)
if err != nil {
@@ -613,11 +610,10 @@ func (client LabsClient) GetResponder(resp *http.Response) (result Lab, err erro
// ListByResourceGroup list labs in a resource group.
//
// resourceGroupName is the name of the resource group. expand is specify the
// $expand query. Example: 'properties($select=defaultStorageAccount)' filter
// is the filter to apply to the operation. top is the maximum number of
// resources to return from the operation. orderby is the ordering expression
// for the results, using OData notation.
// resourceGroupName is the name of the resource group. expand is specify the $expand query. Example:
// 'properties($select=defaultStorageAccount)' filter is the filter to apply to the operation. top is the maximum
// number of resources to return from the operation. orderby is the ordering expression for the results, using OData
// notation.
func (client LabsClient) ListByResourceGroup(resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLab, err error) {
req, err := client.ListByResourceGroupPreparer(resourceGroupName, expand, filter, top, orderby)
if err != nil {
@@ -715,13 +711,56 @@ func (client LabsClient) ListByResourceGroupNextResults(lastResults ResponseWith
return
}
// ListByResourceGroupComplete gets all elements from the list without paging.
func (client LabsClient) ListByResourceGroupComplete(resourceGroupName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Lab, <-chan error) {
resultChan := make(chan Lab)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListByResourceGroup(resourceGroupName, expand, filter, top, orderby)
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.ListByResourceGroupNextResults(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
}
// ListBySubscription list labs in a subscription.
//
// expand is specify the $expand query. Example:
// 'properties($select=defaultStorageAccount)' filter is the filter to apply to
// the operation. top is the maximum number of resources to return from the
// operation. orderby is the ordering expression for the results, using OData
// notation.
// expand is specify the $expand query. Example: 'properties($select=defaultStorageAccount)' filter is the filter to
// apply to the operation. top is the maximum number of resources to return from the operation. orderby is the ordering
// expression for the results, using OData notation.
func (client LabsClient) ListBySubscription(expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLab, err error) {
req, err := client.ListBySubscriptionPreparer(expand, filter, top, orderby)
if err != nil {
@@ -818,10 +857,54 @@ func (client LabsClient) ListBySubscriptionNextResults(lastResults ResponseWithC
return
}
// ListBySubscriptionComplete gets all elements from the list without paging.
func (client LabsClient) ListBySubscriptionComplete(expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Lab, <-chan error) {
resultChan := make(chan Lab)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListBySubscription(expand, filter, top, orderby)
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.ListBySubscriptionNextResults(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
}
// ListVhds list disk images available for custom image creation.
//
// resourceGroupName is the name of the resource group. name is the name of the
// lab.
// resourceGroupName is the name of the resource group. name is the name of the lab.
func (client LabsClient) ListVhds(resourceGroupName string, name string) (result ResponseWithContinuationLabVhd, err error) {
req, err := client.ListVhdsPreparer(resourceGroupName, name)
if err != nil {
@@ -908,10 +991,54 @@ func (client LabsClient) ListVhdsNextResults(lastResults ResponseWithContinuatio
return
}
// ListVhdsComplete gets all elements from the list without paging.
func (client LabsClient) ListVhdsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan LabVhd, <-chan error) {
resultChan := make(chan LabVhd)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListVhds(resourceGroupName, name)
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.ListVhdsNextResults(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
}
// Update modify properties of labs.
//
// resourceGroupName is the name of the resource group. name is the name of the
// lab. lab is a lab.
// resourceGroupName is the name of the resource group. name is the name of the lab. lab is a lab.
func (client LabsClient) Update(resourceGroupName string, name string, lab LabFragment) (result Lab, err error) {
req, err := client.UpdatePreparer(resourceGroupName, name, lab)
if err != nil {
+87 -155
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -63,11 +62,9 @@ const (
type EnableStatus string
const (
// EnableStatusDisabled specifies the enable status disabled state for
// enable status.
// EnableStatusDisabled specifies the enable status disabled state for enable status.
EnableStatusDisabled EnableStatus = "Disabled"
// EnableStatusEnabled specifies the enable status enabled state for enable
// status.
// EnableStatusEnabled specifies the enable status enabled state for enable status.
EnableStatusEnabled EnableStatus = "Enabled"
)
@@ -75,12 +72,10 @@ const (
type FileUploadOptions string
const (
// FileUploadOptionsNone specifies the file upload options none state for
// file upload options.
// FileUploadOptionsNone specifies the file upload options none state for file upload options.
FileUploadOptionsNone FileUploadOptions = "None"
// FileUploadOptionsUploadFilesAndGenerateSasTokens specifies the file
// upload options upload files and generate sas tokens state for file
// upload options.
// FileUploadOptionsUploadFilesAndGenerateSasTokens specifies the file upload options upload files and generate sas
// tokens state for file upload options.
FileUploadOptionsUploadFilesAndGenerateSasTokens FileUploadOptions = "UploadFilesAndGenerateSasTokens"
)
@@ -88,14 +83,11 @@ const (
type HostCachingOptions string
const (
// HostCachingOptionsNone specifies the host caching options none state for
// host caching options.
// HostCachingOptionsNone specifies the host caching options none state for host caching options.
HostCachingOptionsNone HostCachingOptions = "None"
// HostCachingOptionsReadOnly specifies the host caching options read only
// state for host caching options.
// HostCachingOptionsReadOnly specifies the host caching options read only state for host caching options.
HostCachingOptionsReadOnly HostCachingOptions = "ReadOnly"
// HostCachingOptionsReadWrite specifies the host caching options read
// write state for host caching options.
// HostCachingOptionsReadWrite specifies the host caching options read write state for host caching options.
HostCachingOptionsReadWrite HostCachingOptions = "ReadWrite"
)
@@ -103,24 +95,19 @@ const (
type LinuxOsState string
const (
// DeprovisionApplied specifies the deprovision applied state for linux os
// state.
// DeprovisionApplied specifies the deprovision applied state for linux os state.
DeprovisionApplied LinuxOsState = "DeprovisionApplied"
// DeprovisionRequested specifies the deprovision requested state for linux
// os state.
// DeprovisionRequested specifies the deprovision requested state for linux os state.
DeprovisionRequested LinuxOsState = "DeprovisionRequested"
// NonDeprovisioned specifies the non deprovisioned state for linux os
// state.
// NonDeprovisioned specifies the non deprovisioned state for linux os state.
NonDeprovisioned LinuxOsState = "NonDeprovisioned"
)
// NotificationChannelEventType enumerates the values for notification channel
// event type.
// NotificationChannelEventType enumerates the values for notification channel event type.
type NotificationChannelEventType string
const (
// AutoShutdown specifies the auto shutdown state for notification channel
// event type.
// AutoShutdown specifies the auto shutdown state for notification channel event type.
AutoShutdown NotificationChannelEventType = "AutoShutdown"
// Cost specifies the cost state for notification channel event type.
Cost NotificationChannelEventType = "Cost"
@@ -130,11 +117,9 @@ const (
type NotificationStatus string
const (
// NotificationStatusDisabled specifies the notification status disabled
// state for notification status.
// NotificationStatusDisabled specifies the notification status disabled state for notification status.
NotificationStatusDisabled NotificationStatus = "Disabled"
// NotificationStatusEnabled specifies the notification status enabled
// state for notification status.
// NotificationStatusEnabled specifies the notification status enabled state for notification status.
NotificationStatusEnabled NotificationStatus = "Enabled"
)
@@ -142,11 +127,9 @@ const (
type PolicyEvaluatorType string
const (
// AllowedValuesPolicy specifies the allowed values policy state for policy
// evaluator type.
// AllowedValuesPolicy specifies the allowed values policy state for policy evaluator type.
AllowedValuesPolicy PolicyEvaluatorType = "AllowedValuesPolicy"
// MaxValuePolicy specifies the max value policy state for policy evaluator
// type.
// MaxValuePolicy specifies the max value policy state for policy evaluator type.
MaxValuePolicy PolicyEvaluatorType = "MaxValuePolicy"
)
@@ -154,29 +137,23 @@ const (
type PolicyFactName string
const (
// PolicyFactNameGalleryImage specifies the policy fact name gallery image
// state for policy fact name.
// PolicyFactNameGalleryImage specifies the policy fact name gallery image state for policy fact name.
PolicyFactNameGalleryImage PolicyFactName = "GalleryImage"
// PolicyFactNameLabPremiumVMCount specifies the policy fact name lab
// premium vm count state for policy fact name.
// PolicyFactNameLabPremiumVMCount specifies the policy fact name lab premium vm count state for policy fact name.
PolicyFactNameLabPremiumVMCount PolicyFactName = "LabPremiumVmCount"
// PolicyFactNameLabTargetCost specifies the policy fact name lab target
// cost state for policy fact name.
// PolicyFactNameLabTargetCost specifies the policy fact name lab target cost state for policy fact name.
PolicyFactNameLabTargetCost PolicyFactName = "LabTargetCost"
// PolicyFactNameLabVMCount specifies the policy fact name lab vm count
// state for policy fact name.
// PolicyFactNameLabVMCount specifies the policy fact name lab vm count state for policy fact name.
PolicyFactNameLabVMCount PolicyFactName = "LabVmCount"
// PolicyFactNameLabVMSize specifies the policy fact name lab vm size state
// for policy fact name.
// PolicyFactNameLabVMSize specifies the policy fact name lab vm size state for policy fact name.
PolicyFactNameLabVMSize PolicyFactName = "LabVmSize"
// PolicyFactNameUserOwnedLabPremiumVMCount specifies the policy fact name
// user owned lab premium vm count state for policy fact name.
// PolicyFactNameUserOwnedLabPremiumVMCount specifies the policy fact name user owned lab premium vm count state for
// policy fact name.
PolicyFactNameUserOwnedLabPremiumVMCount PolicyFactName = "UserOwnedLabPremiumVmCount"
// PolicyFactNameUserOwnedLabVMCount specifies the policy fact name user
// owned lab vm count state for policy fact name.
// PolicyFactNameUserOwnedLabVMCount specifies the policy fact name user owned lab vm count state for policy fact name.
PolicyFactNameUserOwnedLabVMCount PolicyFactName = "UserOwnedLabVmCount"
// PolicyFactNameUserOwnedLabVMCountInSubnet specifies the policy fact name
// user owned lab vm count in subnet state for policy fact name.
// PolicyFactNameUserOwnedLabVMCountInSubnet specifies the policy fact name user owned lab vm count in subnet state for
// policy fact name.
PolicyFactNameUserOwnedLabVMCountInSubnet PolicyFactName = "UserOwnedLabVmCountInSubnet"
)
@@ -184,11 +161,9 @@ const (
type PolicyStatus string
const (
// PolicyStatusDisabled specifies the policy status disabled state for
// policy status.
// PolicyStatusDisabled specifies the policy status disabled state for policy status.
PolicyStatusDisabled PolicyStatus = "Disabled"
// PolicyStatusEnabled specifies the policy status enabled state for policy
// status.
// PolicyStatusEnabled specifies the policy status enabled state for policy status.
PolicyStatusEnabled PolicyStatus = "Enabled"
)
@@ -196,11 +171,9 @@ const (
type PremiumDataDisk string
const (
// PremiumDataDiskDisabled specifies the premium data disk disabled state
// for premium data disk.
// PremiumDataDiskDisabled specifies the premium data disk disabled state for premium data disk.
PremiumDataDiskDisabled PremiumDataDisk = "Disabled"
// PremiumDataDiskEnabled specifies the premium data disk enabled state for
// premium data disk.
// PremiumDataDiskEnabled specifies the premium data disk enabled state for premium data disk.
PremiumDataDiskEnabled PremiumDataDisk = "Enabled"
)
@@ -208,8 +181,7 @@ const (
type ReportingCycleType string
const (
// CalendarMonth specifies the calendar month state for reporting cycle
// type.
// CalendarMonth specifies the calendar month state for reporting cycle type.
CalendarMonth ReportingCycleType = "CalendarMonth"
// Custom specifies the custom state for reporting cycle type.
Custom ReportingCycleType = "Custom"
@@ -239,11 +211,9 @@ const (
type TargetCostStatus string
const (
// TargetCostStatusDisabled specifies the target cost status disabled state
// for target cost status.
// TargetCostStatusDisabled specifies the target cost status disabled state for target cost status.
TargetCostStatusDisabled TargetCostStatus = "Disabled"
// TargetCostStatusEnabled specifies the target cost status enabled state
// for target cost status.
// TargetCostStatusEnabled specifies the target cost status enabled state for target cost status.
TargetCostStatusEnabled TargetCostStatus = "Enabled"
)
@@ -269,16 +239,13 @@ const (
Deny UsagePermissionType = "Deny"
)
// VirtualMachineCreationSource enumerates the values for virtual machine
// creation source.
// VirtualMachineCreationSource enumerates the values for virtual machine creation source.
type VirtualMachineCreationSource string
const (
// FromCustomImage specifies the from custom image state for virtual
// machine creation source.
// FromCustomImage specifies the from custom image state for virtual machine creation source.
FromCustomImage VirtualMachineCreationSource = "FromCustomImage"
// FromGalleryImage specifies the from gallery image state for virtual
// machine creation source.
// FromGalleryImage specifies the from gallery image state for virtual machine creation source.
FromGalleryImage VirtualMachineCreationSource = "FromGalleryImage"
)
@@ -290,13 +257,12 @@ const (
NonSysprepped WindowsOsState = "NonSysprepped"
// SysprepApplied specifies the sysprep applied state for windows os state.
SysprepApplied WindowsOsState = "SysprepApplied"
// SysprepRequested specifies the sysprep requested state for windows os
// state.
// SysprepRequested specifies the sysprep requested state for windows os state.
SysprepRequested WindowsOsState = "SysprepRequested"
)
// ApplicableSchedule is schedules applicable to a virtual machine. The
// schedules may have been defined on a VM or on lab level.
// ApplicableSchedule is schedules applicable to a virtual machine. The schedules may have been defined on a VM or on
// lab level.
type ApplicableSchedule struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
@@ -307,8 +273,8 @@ type ApplicableSchedule struct {
*ApplicableScheduleProperties `json:"properties,omitempty"`
}
// ApplicableScheduleFragment is schedules applicable to a virtual machine. The
// schedules may have been defined on a VM or on lab level.
// ApplicableScheduleFragment is schedules applicable to a virtual machine. The schedules may have been defined on a VM
// or on lab level.
type ApplicableScheduleFragment struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
@@ -318,22 +284,19 @@ type ApplicableScheduleFragment struct {
*ApplicableSchedulePropertiesFragment `json:"properties,omitempty"`
}
// ApplicableScheduleProperties is properties of a schedules applicable to a
// virtual machine.
// ApplicableScheduleProperties is properties of a schedules applicable to a virtual machine.
type ApplicableScheduleProperties struct {
LabVmsShutdown *Schedule `json:"labVmsShutdown,omitempty"`
LabVmsStartup *Schedule `json:"labVmsStartup,omitempty"`
}
// ApplicableSchedulePropertiesFragment is properties of a schedules applicable
// to a virtual machine.
// ApplicableSchedulePropertiesFragment is properties of a schedules applicable to a virtual machine.
type ApplicableSchedulePropertiesFragment struct {
LabVmsShutdown *ScheduleFragment `json:"labVmsShutdown,omitempty"`
LabVmsStartup *ScheduleFragment `json:"labVmsStartup,omitempty"`
}
// ApplyArtifactsRequest is request body for applying artifacts to a virtual
// machine.
// ApplyArtifactsRequest is request body for applying artifacts to a virtual machine.
type ApplyArtifactsRequest struct {
Artifacts *[]ArtifactInstallProperties `json:"artifacts,omitempty"`
}
@@ -356,8 +319,7 @@ type ArmTemplateInfo struct {
Parameters *map[string]interface{} `json:"parameters,omitempty"`
}
// ArmTemplateParameterProperties is properties of an Azure Resource Manager
// template parameter.
// ArmTemplateParameterProperties is properties of an Azure Resource Manager template parameter.
type ArmTemplateParameterProperties struct {
Name *string `json:"name,omitempty"`
Value *string `json:"value,omitempty"`
@@ -392,8 +354,7 @@ type ArtifactDeploymentStatusProperties struct {
TotalArtifacts *int32 `json:"totalArtifacts,omitempty"`
}
// ArtifactDeploymentStatusPropertiesFragment is properties of an artifact
// deployment.
// ArtifactDeploymentStatusPropertiesFragment is properties of an artifact deployment.
type ArtifactDeploymentStatusPropertiesFragment struct {
DeploymentStatus *string `json:"deploymentStatus,omitempty"`
ArtifactsApplied *int32 `json:"artifactsApplied,omitempty"`
@@ -499,16 +460,14 @@ type AttachDiskProperties struct {
LeasedByLabVMID *string `json:"leasedByLabVmId,omitempty"`
}
// AttachNewDataDiskOptions is properties to attach new disk to the Virtual
// Machine.
// AttachNewDataDiskOptions is properties to attach new disk to the Virtual Machine.
type AttachNewDataDiskOptions struct {
DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
DiskName *string `json:"diskName,omitempty"`
DiskType StorageType `json:"diskType,omitempty"`
}
// BulkCreationParameters is parameters for creating multiple virtual machines
// as a single action.
// BulkCreationParameters is parameters for creating multiple virtual machines as a single action.
type BulkCreationParameters struct {
InstanceCount *int32 `json:"instanceCount,omitempty"`
}
@@ -549,16 +508,14 @@ type ComputeVMInstanceViewStatus struct {
Message *string `json:"message,omitempty"`
}
// ComputeVMInstanceViewStatusFragment is status information about a virtual
// machine.
// ComputeVMInstanceViewStatusFragment is status information about a virtual machine.
type ComputeVMInstanceViewStatusFragment struct {
Code *string `json:"code,omitempty"`
DisplayStatus *string `json:"displayStatus,omitempty"`
Message *string `json:"message,omitempty"`
}
// ComputeVMProperties is properties of a virtual machine returned by the
// Microsoft.Compute API.
// ComputeVMProperties is properties of a virtual machine returned by the Microsoft.Compute API.
type ComputeVMProperties struct {
Statuses *[]ComputeVMInstanceViewStatus `json:"statuses,omitempty"`
OsType *string `json:"osType,omitempty"`
@@ -569,8 +526,7 @@ type ComputeVMProperties struct {
DataDisks *[]ComputeDataDisk `json:"dataDisks,omitempty"`
}
// ComputeVMPropertiesFragment is properties of a virtual machine returned by
// the Microsoft.Compute API.
// ComputeVMPropertiesFragment is properties of a virtual machine returned by the Microsoft.Compute API.
type ComputeVMPropertiesFragment struct {
Statuses *[]ComputeVMInstanceViewStatusFragment `json:"statuses,omitempty"`
OsType *string `json:"osType,omitempty"`
@@ -613,24 +569,21 @@ type CustomImageProperties struct {
UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
}
// CustomImagePropertiesCustom is properties for creating a custom image from a
// VHD.
// CustomImagePropertiesCustom is properties for creating a custom image from a VHD.
type CustomImagePropertiesCustom struct {
ImageName *string `json:"imageName,omitempty"`
SysPrep *bool `json:"sysPrep,omitempty"`
OsType CustomImageOsType `json:"osType,omitempty"`
}
// CustomImagePropertiesFromVM is properties for creating a custom image from a
// virtual machine.
// CustomImagePropertiesFromVM is properties for creating a custom image from a virtual machine.
type CustomImagePropertiesFromVM struct {
SourceVMID *string `json:"sourceVmId,omitempty"`
WindowsOsInfo *WindowsOsInfo `json:"windowsOsInfo,omitempty"`
LinuxOsInfo *LinuxOsInfo `json:"linuxOsInfo,omitempty"`
}
// DataDiskProperties is request body for adding a new or existing data disk to
// a virtual machine.
// DataDiskProperties is request body for adding a new or existing data disk to a virtual machine.
type DataDiskProperties struct {
AttachNewDataDiskOptions *AttachNewDataDiskOptions `json:"attachNewDataDiskOptions,omitempty"`
ExistingLabDiskID *string `json:"existingLabDiskId,omitempty"`
@@ -647,8 +600,7 @@ type DayDetailsFragment struct {
Time *string `json:"time,omitempty"`
}
// DetachDataDiskProperties is request body for detaching data disk from a
// virtual machine.
// DetachDataDiskProperties is request body for detaching data disk from a virtual machine.
type DetachDataDiskProperties struct {
ExistingLabDiskID *string `json:"existingLabDiskId,omitempty"`
}
@@ -683,8 +635,7 @@ type DiskProperties struct {
UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
}
// DtlEnvironment is an environment, which is essentially an ARM template
// deployment.
// DtlEnvironment is an environment, which is essentially an ARM template deployment.
type DtlEnvironment struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
@@ -745,22 +696,19 @@ type ExportResourceUsageParameters struct {
UsageStartDate *date.Time `json:"usageStartDate,omitempty"`
}
// ExternalSubnet is subnet information as returned by the Microsoft.Network
// API.
// ExternalSubnet is subnet information as returned by the Microsoft.Network API.
type ExternalSubnet struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
}
// ExternalSubnetFragment is subnet information as returned by the
// Microsoft.Network API.
// ExternalSubnetFragment is subnet information as returned by the Microsoft.Network API.
type ExternalSubnetFragment struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
}
// Formula is a formula for creating a VM, specifying an image base and other
// parameters
// Formula is a formula for creating a VM, specifying an image base and other parameters
type Formula struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
@@ -783,8 +731,7 @@ type FormulaProperties struct {
UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
}
// FormulaPropertiesFromVM is information about a VM from which a formula is to
// be created.
// FormulaPropertiesFromVM is information about a VM from which a formula is to be created.
type FormulaPropertiesFromVM struct {
LabVMID *string `json:"labVmId,omitempty"`
}
@@ -809,8 +756,7 @@ type GalleryImageProperties struct {
Enabled *bool `json:"enabled,omitempty"`
}
// GalleryImageReference is the reference information for an Azure Marketplace
// image.
// GalleryImageReference is the reference information for an Azure Marketplace image.
type GalleryImageReference struct {
Offer *string `json:"offer,omitempty"`
Publisher *string `json:"publisher,omitempty"`
@@ -819,8 +765,7 @@ type GalleryImageReference struct {
Version *string `json:"version,omitempty"`
}
// GalleryImageReferenceFragment is the reference information for an Azure
// Marketplace image.
// GalleryImageReferenceFragment is the reference information for an Azure Marketplace image.
type GalleryImageReferenceFragment struct {
Offer *string `json:"offer,omitempty"`
Publisher *string `json:"publisher,omitempty"`
@@ -829,8 +774,7 @@ type GalleryImageReferenceFragment struct {
Version *string `json:"version,omitempty"`
}
// GenerateArmTemplateRequest is parameters for generating an ARM template for
// deploying artifacts.
// GenerateArmTemplateRequest is parameters for generating an ARM template for deploying artifacts.
type GenerateArmTemplateRequest struct {
VirtualMachineName *string `json:"virtualMachineName,omitempty"`
Parameters *[]ParameterInfo `json:"parameters,omitempty"`
@@ -867,16 +811,16 @@ type IdentityProperties struct {
ClientSecretURL *string `json:"clientSecretUrl,omitempty"`
}
// InboundNatRule is a rule for NAT - exposing a VM's port (backendPort) on the
// public IP address using a load balancer.
// InboundNatRule is a rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load
// balancer.
type InboundNatRule struct {
TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
FrontendPort *int32 `json:"frontendPort,omitempty"`
BackendPort *int32 `json:"backendPort,omitempty"`
}
// InboundNatRuleFragment is a rule for NAT - exposing a VM's port
// (backendPort) on the public IP address using a load balancer.
// InboundNatRuleFragment is a rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load
// balancer.
type InboundNatRuleFragment struct {
TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
FrontendPort *int32 `json:"frontendPort,omitempty"`
@@ -992,8 +936,7 @@ type LabVirtualMachine struct {
*LabVirtualMachineProperties `json:"properties,omitempty"`
}
// LabVirtualMachineCreationParameter is properties for creating a virtual
// machine.
// LabVirtualMachineCreationParameter is properties for creating a virtual machine.
type LabVirtualMachineCreationParameter struct {
*LabVirtualMachineCreationParameterProperties `json:"properties,omitempty"`
Name *string `json:"name,omitempty"`
@@ -1001,8 +944,7 @@ type LabVirtualMachineCreationParameter struct {
Tags *map[string]*string `json:"tags,omitempty"`
}
// LabVirtualMachineCreationParameterProperties is properties for virtual
// machine creation.
// LabVirtualMachineCreationParameterProperties is properties for virtual machine creation.
type LabVirtualMachineCreationParameterProperties struct {
BulkCreationParameters *BulkCreationParameters `json:"bulkCreationParameters,omitempty"`
Notes *string `json:"notes,omitempty"`
@@ -1213,15 +1155,13 @@ type ParameterInfo struct {
Value *string `json:"value,omitempty"`
}
// ParametersValueFileInfo is a file containing a set of parameter values for
// an ARM template.
// ParametersValueFileInfo is a file containing a set of parameter values for an ARM template.
type ParametersValueFileInfo struct {
FileName *string `json:"fileName,omitempty"`
ParametersValueInfo *map[string]interface{} `json:"parametersValueInfo,omitempty"`
}
// PercentageCostThresholdProperties is properties of a percentage cost
// threshold.
// PercentageCostThresholdProperties is properties of a percentage cost threshold.
type PercentageCostThresholdProperties struct {
ThresholdValue *float64 `json:"thresholdValue,omitempty"`
}
@@ -1495,8 +1435,7 @@ func (client ResponseWithContinuationLabVhd) ResponseWithContinuationLabVhdPrepa
autorest.WithBaseURL(to.String(client.NextLink)))
}
// ResponseWithContinuationLabVirtualMachine is the response of a list
// operation.
// ResponseWithContinuationLabVirtualMachine is the response of a list operation.
type ResponseWithContinuationLabVirtualMachine struct {
autorest.Response `json:"-"`
Value *[]LabVirtualMachine `json:"value,omitempty"`
@@ -1515,8 +1454,7 @@ func (client ResponseWithContinuationLabVirtualMachine) ResponseWithContinuation
autorest.WithBaseURL(to.String(client.NextLink)))
}
// ResponseWithContinuationNotificationChannel is the response of a list
// operation.
// ResponseWithContinuationNotificationChannel is the response of a list operation.
type ResponseWithContinuationNotificationChannel struct {
autorest.Response `json:"-"`
Value *[]NotificationChannel `json:"value,omitempty"`
@@ -1649,8 +1587,7 @@ func (client ResponseWithContinuationVirtualNetwork) ResponseWithContinuationVir
autorest.WithBaseURL(to.String(client.NextLink)))
}
// RetargetScheduleProperties is properties for retargeting a virtual machine
// schedule.
// RetargetScheduleProperties is properties for retargeting a virtual machine schedule.
type RetargetScheduleProperties struct {
CurrentResourceID *string `json:"currentResourceId,omitempty"`
TargetResourceID *string `json:"targetResourceId,omitempty"`
@@ -1724,8 +1661,7 @@ type SecretProperties struct {
UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
}
// ServiceRunner is a container for a managed identity to execute DevTest lab
// services.
// ServiceRunner is a container for a managed identity to execute DevTest lab services.
type ServiceRunner struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
@@ -1736,21 +1672,20 @@ type ServiceRunner struct {
Identity *IdentityProperties `json:"identity,omitempty"`
}
// SharedPublicIPAddressConfiguration is properties of a virtual machine that
// determine how it is connected to a load balancer.
// SharedPublicIPAddressConfiguration is properties of a virtual machine that determine how it is connected to a load
// balancer.
type SharedPublicIPAddressConfiguration struct {
InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
}
// SharedPublicIPAddressConfigurationFragment is properties of a virtual
// machine that determine how it is connected to a load balancer.
// SharedPublicIPAddressConfigurationFragment is properties of a virtual machine that determine how it is connected to
// a load balancer.
type SharedPublicIPAddressConfigurationFragment struct {
InboundNatRules *[]InboundNatRuleFragment `json:"inboundNatRules,omitempty"`
}
// ShutdownNotificationContent is the contents of a shutdown notification.
// Webhooks can use this type to deserialize the request body when they get
// notified of an imminent shutdown.
// ShutdownNotificationContent is the contents of a shutdown notification. Webhooks can use this type to deserialize
// the request body when they get notified of an imminent shutdown.
type ShutdownNotificationContent struct {
SkipURL *string `json:"skipUrl,omitempty"`
DelayURL60 *string `json:"delayUrl60,omitempty"`
@@ -1789,8 +1724,7 @@ type SubnetOverride struct {
VirtualNetworkPoolName *string `json:"virtualNetworkPoolName,omitempty"`
}
// SubnetOverrideFragment is property overrides on a subnet of a virtual
// network.
// SubnetOverrideFragment is property overrides on a subnet of a virtual network.
type SubnetOverrideFragment struct {
ResourceID *string `json:"resourceId,omitempty"`
LabSubnetName *string `json:"labSubnetName,omitempty"`
@@ -1800,14 +1734,12 @@ type SubnetOverrideFragment struct {
VirtualNetworkPoolName *string `json:"virtualNetworkPoolName,omitempty"`
}
// SubnetSharedPublicIPAddressConfiguration is configuration for public IP
// address sharing.
// SubnetSharedPublicIPAddressConfiguration is configuration for public IP address sharing.
type SubnetSharedPublicIPAddressConfiguration struct {
AllowedPorts *[]Port `json:"allowedPorts,omitempty"`
}
// SubnetSharedPublicIPAddressConfigurationFragment is configuration for public
// IP address sharing.
// SubnetSharedPublicIPAddressConfigurationFragment is configuration for public IP address sharing.
type SubnetSharedPublicIPAddressConfigurationFragment struct {
AllowedPorts *[]PortFragment `json:"allowedPorts,omitempty"`
}
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -30,23 +29,20 @@ type NotificationChannelsClient struct {
ManagementClient
}
// NewNotificationChannelsClient creates an instance of the
// NotificationChannelsClient client.
// NewNotificationChannelsClient creates an instance of the NotificationChannelsClient client.
func NewNotificationChannelsClient(subscriptionID string) NotificationChannelsClient {
return NewNotificationChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewNotificationChannelsClientWithBaseURI creates an instance of the
// NotificationChannelsClient client.
// NewNotificationChannelsClientWithBaseURI creates an instance of the NotificationChannelsClient client.
func NewNotificationChannelsClientWithBaseURI(baseURI string, subscriptionID string) NotificationChannelsClient {
return NotificationChannelsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing notificationChannel.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the notificationChannel. notificationChannel is
// a notification.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// notificationChannel. notificationChannel is a notification.
func (client NotificationChannelsClient) CreateOrUpdate(resourceGroupName string, labName string, name string, notificationChannel NotificationChannel) (result NotificationChannel, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: notificationChannel,
@@ -120,8 +116,8 @@ func (client NotificationChannelsClient) CreateOrUpdateResponder(resp *http.Resp
// Delete delete notificationchannel.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the notificationChannel.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// notificationChannel.
func (client NotificationChannelsClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, labName, name)
if err != nil {
@@ -186,9 +182,8 @@ func (client NotificationChannelsClient) DeleteResponder(resp *http.Response) (r
// Get get notificationchannel.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the notificationChannel. expand is specify the
// $expand query. Example: 'properties($select=webHookUrl)'
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// notificationChannel. expand is specify the $expand query. Example: 'properties($select=webHookUrl)'
func (client NotificationChannelsClient) Get(resourceGroupName string, labName string, name string, expand string) (result NotificationChannel, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
if err != nil {
@@ -257,11 +252,9 @@ func (client NotificationChannelsClient) GetResponder(resp *http.Response) (resu
// List list notificationchannels in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. expand is specify the $expand query. Example:
// 'properties($select=webHookUrl)' filter is the filter to apply to the
// operation. top is the maximum number of resources to return from the
// operation. orderby is the ordering expression for the results, using OData
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($select=webHookUrl)' filter is the filter to apply to the operation. top is the maximum
// number of resources to return from the operation. orderby is the ordering expression for the results, using OData
// notation.
func (client NotificationChannelsClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationNotificationChannel, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
@@ -361,11 +354,55 @@ func (client NotificationChannelsClient) ListNextResults(lastResults ResponseWit
return
}
// ListComplete gets all elements from the list without paging.
func (client NotificationChannelsClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan NotificationChannel, <-chan error) {
resultChan := make(chan NotificationChannel)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
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
}
// Notify send notification to provided channel.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the notificationChannel. notifyParameters is
// properties for generating a Notification.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// notificationChannel. notifyParameters is properties for generating a Notification.
func (client NotificationChannelsClient) Notify(resourceGroupName string, labName string, name string, notifyParameters NotifyParameters) (result autorest.Response, err error) {
req, err := client.NotifyPreparer(resourceGroupName, labName, name, notifyParameters)
if err != nil {
@@ -432,9 +469,8 @@ func (client NotificationChannelsClient) NotifyResponder(resp *http.Response) (r
// Update modify properties of notificationchannels.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the notificationChannel. notificationChannel is
// a notification.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// notificationChannel. notificationChannel is a notification.
func (client NotificationChannelsClient) Update(resourceGroupName string, labName string, name string, notificationChannel NotificationChannelFragment) (result NotificationChannel, err error) {
req, err := client.UpdatePreparer(resourceGroupName, labName, name, notificationChannel)
if err != nil {
+60 -23
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -35,17 +34,15 @@ func NewPoliciesClient(subscriptionID string) PoliciesClient {
return NewPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient
// client.
// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client.
func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PoliciesClient {
return PoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing policy.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. policySetName is the name of the policy set. name is the name of
// the policy. policy is a Policy.
// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of
// the policy set. name is the name of the policy. policy is a Policy.
func (client PoliciesClient) CreateOrUpdate(resourceGroupName string, labName string, policySetName string, name string, policy Policy) (result Policy, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: policy,
@@ -120,9 +117,8 @@ func (client PoliciesClient) CreateOrUpdateResponder(resp *http.Response) (resul
// Delete delete policy.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. policySetName is the name of the policy set. name is the name of
// the policy.
// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of
// the policy set. name is the name of the policy.
func (client PoliciesClient) Delete(resourceGroupName string, labName string, policySetName string, name string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, labName, policySetName, name)
if err != nil {
@@ -188,9 +184,8 @@ func (client PoliciesClient) DeleteResponder(resp *http.Response) (result autore
// Get get policy.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. policySetName is the name of the policy set. name is the name of
// the policy. expand is specify the $expand query. Example:
// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of
// the policy set. name is the name of the policy. expand is specify the $expand query. Example:
// 'properties($select=description)'
func (client PoliciesClient) Get(resourceGroupName string, labName string, policySetName string, name string, expand string) (result Policy, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, policySetName, name, expand)
@@ -261,12 +256,10 @@ func (client PoliciesClient) GetResponder(resp *http.Response) (result Policy, e
// List list policies in a given policy set.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. policySetName is the name of the policy set. expand is specify the
// $expand query. Example: 'properties($select=description)' filter is the
// filter to apply to the operation. top is the maximum number of resources to
// return from the operation. orderby is the ordering expression for the
// results, using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of
// the policy set. expand is specify the $expand query. Example: 'properties($select=description)' filter is the filter
// to apply to the operation. top is the maximum number of resources to return from the operation. orderby is the
// ordering expression for the results, using OData notation.
func (client PoliciesClient) List(resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationPolicy, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, policySetName, expand, filter, top, orderby)
if err != nil {
@@ -366,11 +359,55 @@ func (client PoliciesClient) ListNextResults(lastResults ResponseWithContinuatio
return
}
// ListComplete gets all elements from the list without paging.
func (client PoliciesClient) ListComplete(resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Policy, <-chan error) {
resultChan := make(chan Policy)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, policySetName, expand, filter, top, orderby)
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
}
// Update modify properties of policies.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. policySetName is the name of the policy set. name is the name of
// the policy. policy is a Policy.
// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of
// the policy set. name is the name of the policy. policy is a Policy.
func (client PoliciesClient) Update(resourceGroupName string, labName string, policySetName string, name string, policy PolicyFragment) (result Policy, err error) {
req, err := client.UpdatePreparer(resourceGroupName, labName, policySetName, name, policy)
if err != nil {
+5 -8
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -34,17 +33,15 @@ func NewPolicySetsClient(subscriptionID string) PolicySetsClient {
return NewPolicySetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewPolicySetsClientWithBaseURI creates an instance of the PolicySetsClient
// client.
// NewPolicySetsClientWithBaseURI creates an instance of the PolicySetsClient client.
func NewPolicySetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySetsClient {
return PolicySetsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// EvaluatePolicies evaluates lab policy.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the policy set. evaluatePoliciesRequest is
// request body for evaluating a policy set.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the policy
// set. evaluatePoliciesRequest is request body for evaluating a policy set.
func (client PolicySetsClient) EvaluatePolicies(resourceGroupName string, labName string, name string, evaluatePoliciesRequest EvaluatePoliciesRequest) (result EvaluatePoliciesResponse, err error) {
req, err := client.EvaluatePoliciesPreparer(resourceGroupName, labName, name, evaluatePoliciesRequest)
if err != nil {
+114 -27
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -35,16 +34,15 @@ func NewSchedulesClient(subscriptionID string) SchedulesClient {
return NewSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewSchedulesClientWithBaseURI creates an instance of the SchedulesClient
// client.
// NewSchedulesClientWithBaseURI creates an instance of the SchedulesClient client.
func NewSchedulesClientWithBaseURI(baseURI string, subscriptionID string) SchedulesClient {
return SchedulesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing schedule.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the schedule. schedule is a schedule.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// schedule. schedule is a schedule.
func (client SchedulesClient) CreateOrUpdate(resourceGroupName string, labName string, name string, schedule Schedule) (result Schedule, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: schedule,
@@ -118,8 +116,8 @@ func (client SchedulesClient) CreateOrUpdateResponder(resp *http.Response) (resu
// Delete delete schedule.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the schedule.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// schedule.
func (client SchedulesClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, labName, name)
if err != nil {
@@ -182,13 +180,12 @@ func (client SchedulesClient) DeleteResponder(resp *http.Response) (result autor
return
}
// Execute execute a schedule. This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Execute execute a schedule. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the schedule.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// schedule.
func (client SchedulesClient) Execute(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -196,8 +193,10 @@ func (client SchedulesClient) Execute(resourceGroupName string, labName string,
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -266,9 +265,8 @@ func (client SchedulesClient) ExecuteResponder(resp *http.Response) (result auto
// Get get schedule.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the schedule. expand is specify the $expand
// query. Example: 'properties($select=status)'
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// schedule. expand is specify the $expand query. Example: 'properties($select=status)'
func (client SchedulesClient) Get(resourceGroupName string, labName string, name string, expand string) (result Schedule, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
if err != nil {
@@ -337,11 +335,10 @@ func (client SchedulesClient) GetResponder(resp *http.Response) (result Schedule
// List list schedules in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. expand is specify the $expand query. Example:
// 'properties($select=status)' filter is the filter to apply to the operation.
// top is the maximum number of resources to return from the operation. orderby
// is the ordering expression for the results, using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($select=status)' filter is the filter to apply to the operation. top is the maximum
// number of resources to return from the operation. orderby is the ordering expression for the results, using OData
// notation.
func (client SchedulesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedule, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -440,10 +437,55 @@ func (client SchedulesClient) ListNextResults(lastResults ResponseWithContinuati
return
}
// ListComplete gets all elements from the list without paging.
func (client SchedulesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) {
resultChan := make(chan Schedule)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
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
}
// ListApplicable lists all applicable schedules
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the schedule.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// schedule.
func (client SchedulesClient) ListApplicable(resourceGroupName string, labName string, name string) (result ResponseWithContinuationSchedule, err error) {
req, err := client.ListApplicablePreparer(resourceGroupName, labName, name)
if err != nil {
@@ -531,10 +573,55 @@ func (client SchedulesClient) ListApplicableNextResults(lastResults ResponseWith
return
}
// ListApplicableComplete gets all elements from the list without paging.
func (client SchedulesClient) ListApplicableComplete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) {
resultChan := make(chan Schedule)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListApplicable(resourceGroupName, labName, name)
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.ListApplicableNextResults(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
}
// Update modify properties of schedules.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the schedule. schedule is a schedule.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the
// schedule. schedule is a schedule.
func (client SchedulesClient) Update(resourceGroupName string, labName string, name string, schedule ScheduleFragment) (result Schedule, err error) {
req, err := client.UpdatePreparer(resourceGroupName, labName, name, schedule)
if err != nil {
+57 -18
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -42,9 +41,8 @@ func NewSecretsClientWithBaseURI(baseURI string, subscriptionID string) SecretsC
// CreateOrUpdate create or replace an existing secret.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// secret. secret is a secret.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the secret. secret is a secret.
func (client SecretsClient) CreateOrUpdate(resourceGroupName string, labName string, userName string, name string, secret Secret) (result Secret, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: secret,
@@ -119,9 +117,8 @@ func (client SecretsClient) CreateOrUpdateResponder(resp *http.Response) (result
// Delete delete secret.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// secret.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the secret.
func (client SecretsClient) Delete(resourceGroupName string, labName string, userName string, name string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, labName, userName, name)
if err != nil {
@@ -187,9 +184,8 @@ func (client SecretsClient) DeleteResponder(resp *http.Response) (result autores
// Get get secret.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. name is the name of the
// secret. expand is specify the $expand query. Example:
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. name is the name of the secret. expand is specify the $expand query. Example:
// 'properties($select=value)'
func (client SecretsClient) Get(resourceGroupName string, labName string, userName string, name string, expand string) (result Secret, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, userName, name, expand)
@@ -260,12 +256,10 @@ func (client SecretsClient) GetResponder(resp *http.Response) (result Secret, er
// List list secrets in a given user profile.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. userName is the name of the user profile. expand is specify the
// $expand query. Example: 'properties($select=value)' filter is the filter to
// apply to the operation. top is the maximum number of resources to return
// from the operation. orderby is the ordering expression for the results,
// using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the
// user profile. expand is specify the $expand query. Example: 'properties($select=value)' filter is the filter to
// apply to the operation. top is the maximum number of resources to return from the operation. orderby is the ordering
// expression for the results, using OData notation.
func (client SecretsClient) List(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSecret, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, userName, expand, filter, top, orderby)
if err != nil {
@@ -364,3 +358,48 @@ func (client SecretsClient) ListNextResults(lastResults ResponseWithContinuation
return
}
// ListComplete gets all elements from the list without paging.
func (client SecretsClient) ListComplete(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Secret, <-chan error) {
resultChan := make(chan Secret)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, userName, expand, filter, top, orderby)
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
}
+57 -17
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -29,23 +28,20 @@ type ServiceRunnersClient struct {
ManagementClient
}
// NewServiceRunnersClient creates an instance of the ServiceRunnersClient
// client.
// NewServiceRunnersClient creates an instance of the ServiceRunnersClient client.
func NewServiceRunnersClient(subscriptionID string) ServiceRunnersClient {
return NewServiceRunnersClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewServiceRunnersClientWithBaseURI creates an instance of the
// ServiceRunnersClient client.
// NewServiceRunnersClientWithBaseURI creates an instance of the ServiceRunnersClient client.
func NewServiceRunnersClientWithBaseURI(baseURI string, subscriptionID string) ServiceRunnersClient {
return ServiceRunnersClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing Service runner.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the service runner. serviceRunner is a
// container for a managed identity to execute DevTest lab services.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the service
// runner. serviceRunner is a container for a managed identity to execute DevTest lab services.
func (client ServiceRunnersClient) CreateOrUpdate(resourceGroupName string, labName string, name string, serviceRunner ServiceRunner) (result ServiceRunner, err error) {
req, err := client.CreateOrUpdatePreparer(resourceGroupName, labName, name, serviceRunner)
if err != nil {
@@ -113,8 +109,8 @@ func (client ServiceRunnersClient) CreateOrUpdateResponder(resp *http.Response)
// Delete delete service runner.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the service runner.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the service
// runner.
func (client ServiceRunnersClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, labName, name)
if err != nil {
@@ -179,8 +175,8 @@ func (client ServiceRunnersClient) DeleteResponder(resp *http.Response) (result
// Get get service runner.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the service runner.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the service
// runner.
func (client ServiceRunnersClient) Get(resourceGroupName string, labName string, name string) (result ServiceRunner, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name)
if err != nil {
@@ -246,9 +242,8 @@ func (client ServiceRunnersClient) GetResponder(resp *http.Response) (result Ser
// List list service runners in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. filter is the filter to apply to the operation. top is the maximum
// number of resources to return from the operation. orderby is the ordering
// resourceGroupName is the name of the resource group. labName is the name of the lab. filter is the filter to apply
// to the operation. top is the maximum number of resources to return from the operation. orderby is the ordering
// expression for the results, using OData notation.
func (client ServiceRunnersClient) List(resourceGroupName string, labName string, filter string, top *int32, orderby string) (result ResponseWithContinuationServiceRunner, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, filter, top, orderby)
@@ -344,3 +339,48 @@ func (client ServiceRunnersClient) ListNextResults(lastResults ResponseWithConti
return
}
// ListComplete gets all elements from the list without paging.
func (client ServiceRunnersClient) ListComplete(resourceGroupName string, labName string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan ServiceRunner, <-chan error) {
resultChan := make(chan ServiceRunner)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, filter, top, orderby)
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
}
+63 -23
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -41,9 +40,8 @@ func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClien
// CreateOrUpdate create or replace an existing user profile.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the user profile. userParameter is profile of a
// lab user.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the user
// profile. userParameter is profile of a lab user.
func (client UsersClient) CreateOrUpdate(resourceGroupName string, labName string, name string, userParameter User) (result User, err error) {
req, err := client.CreateOrUpdatePreparer(resourceGroupName, labName, name, userParameter)
if err != nil {
@@ -109,13 +107,12 @@ func (client UsersClient) CreateOrUpdateResponder(resp *http.Response) (result U
return
}
// Delete delete user profile. This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Delete delete user profile. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the user profile.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the user
// profile.
func (client UsersClient) Delete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -123,8 +120,10 @@ func (client UsersClient) Delete(resourceGroupName string, labName string, name
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -193,9 +192,8 @@ func (client UsersClient) DeleteResponder(resp *http.Response) (result autorest.
// Get get user profile.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the user profile. expand is specify the $expand
// query. Example: 'properties($select=identity)'
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the user
// profile. expand is specify the $expand query. Example: 'properties($select=identity)'
func (client UsersClient) Get(resourceGroupName string, labName string, name string, expand string) (result User, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
if err != nil {
@@ -264,11 +262,9 @@ func (client UsersClient) GetResponder(resp *http.Response) (result User, err er
// List list user profiles in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. expand is specify the $expand query. Example:
// 'properties($select=identity)' filter is the filter to apply to the
// operation. top is the maximum number of resources to return from the
// operation. orderby is the ordering expression for the results, using OData
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($select=identity)' filter is the filter to apply to the operation. top is the maximum
// number of resources to return from the operation. orderby is the ordering expression for the results, using OData
// notation.
func (client UsersClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationUser, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
@@ -368,11 +364,55 @@ func (client UsersClient) ListNextResults(lastResults ResponseWithContinuationUs
return
}
// ListComplete gets all elements from the list without paging.
func (client UsersClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan User, <-chan error) {
resultChan := make(chan User)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
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
}
// Update modify properties of user profiles.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the user profile. userParameter is profile of a
// lab user.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the user
// profile. userParameter is profile of a lab user.
func (client UsersClient) Update(resourceGroupName string, labName string, name string, userParameter UserFragment) (result User, err error) {
req, err := client.UpdatePreparer(resourceGroupName, labName, name, userParameter)
if err != nil {
+4 -5
View File
@@ -14,16 +14,15 @@ package devtestlabs
// 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.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.1.0-beta arm-devtestlabs/2016-05-15"
return "Azure-SDK-For-Go/v11.0.0-beta arm-devtestlabs/2016-05-15"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.1.0-beta"
return "v11.0.0-beta"
}
+118 -76
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -30,26 +29,22 @@ type VirtualMachinesClient struct {
ManagementClient
}
// NewVirtualMachinesClient creates an instance of the VirtualMachinesClient
// client.
// NewVirtualMachinesClient creates an instance of the VirtualMachinesClient client.
func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient {
return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewVirtualMachinesClientWithBaseURI creates an instance of the
// VirtualMachinesClient client.
// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client.
func NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachinesClient {
return VirtualMachinesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// AddDataDisk attach a new or existing data disk to virtual machine. This
// operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
// AddDataDisk attach a new or existing data disk to virtual machine. This operation can take a while to complete. This
// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be
// used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine. dataDiskProperties is
// request body for adding a new or existing data disk to a virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine. dataDiskProperties is request body for adding a new or existing data disk to a virtual machine.
func (client VirtualMachinesClient) AddDataDisk(resourceGroupName string, labName string, name string, dataDiskProperties DataDiskProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -57,8 +52,10 @@ func (client VirtualMachinesClient) AddDataDisk(resourceGroupName string, labNam
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -127,14 +124,12 @@ func (client VirtualMachinesClient) AddDataDiskResponder(resp *http.Response) (r
return
}
// ApplyArtifacts apply artifacts to virtual machine. This operation can take a
// while to complete. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
// ApplyArtifacts apply artifacts to virtual machine. This operation can take a while to complete. This method may poll
// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine. applyArtifactsRequest is
// request body for applying artifacts to a virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine. applyArtifactsRequest is request body for applying artifacts to a virtual machine.
func (client VirtualMachinesClient) ApplyArtifacts(resourceGroupName string, labName string, name string, applyArtifactsRequest ApplyArtifactsRequest, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -142,8 +137,10 @@ func (client VirtualMachinesClient) ApplyArtifacts(resourceGroupName string, lab
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -212,13 +209,12 @@ func (client VirtualMachinesClient) ApplyArtifactsResponder(resp *http.Response)
return
}
// Claim take ownership of an existing virtual machine This operation can take
// a while to complete. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// Claim take ownership of an existing virtual machine This operation can take a while to complete. This method may
// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine.
func (client VirtualMachinesClient) Claim(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -226,8 +222,10 @@ func (client VirtualMachinesClient) Claim(resourceGroupName string, labName stri
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -294,14 +292,12 @@ func (client VirtualMachinesClient) ClaimResponder(resp *http.Response) (result
return
}
// CreateOrUpdate create or replace an existing Virtual machine. This operation
// can take a while to complete. This method may poll for completion. Polling
// can be canceled by passing the cancel channel argument. The channel will be
// CreateOrUpdate create or replace an existing Virtual machine. This operation can take a while to complete. This
// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be
// used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine. labVirtualMachine is a
// virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine. labVirtualMachine is a virtual machine.
func (client VirtualMachinesClient) CreateOrUpdate(resourceGroupName string, labName string, name string, labVirtualMachine LabVirtualMachine, cancel <-chan struct{}) (<-chan LabVirtualMachine, <-chan error) {
resultChan := make(chan LabVirtualMachine, 1)
errChan := make(chan error, 1)
@@ -327,8 +323,10 @@ func (client VirtualMachinesClient) CreateOrUpdate(resourceGroupName string, lab
var err error
var result LabVirtualMachine
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -398,13 +396,12 @@ func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response)
return
}
// Delete delete virtual machine. This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Delete delete virtual machine. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine.
func (client VirtualMachinesClient) Delete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -412,8 +409,10 @@ func (client VirtualMachinesClient) Delete(resourceGroupName string, labName str
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -480,14 +479,12 @@ func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result
return
}
// DetachDataDisk detach the specified disk from the virtual machine. This
// operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
// DetachDataDisk detach the specified disk from the virtual machine. This operation can take a while to complete. This
// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be
// used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine. detachDataDiskProperties
// is request body for detaching data disk from a virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine. detachDataDiskProperties is request body for detaching data disk from a virtual machine.
func (client VirtualMachinesClient) DetachDataDisk(resourceGroupName string, labName string, name string, detachDataDiskProperties DetachDataDiskProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -495,8 +492,10 @@ func (client VirtualMachinesClient) DetachDataDisk(resourceGroupName string, lab
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -567,9 +566,8 @@ func (client VirtualMachinesClient) DetachDataDiskResponder(resp *http.Response)
// Get get virtual machine.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine. expand is specify the
// $expand query. Example:
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine. expand is specify the $expand query. Example:
// 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)'
func (client VirtualMachinesClient) Get(resourceGroupName string, labName string, name string, expand string) (result LabVirtualMachine, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
@@ -639,12 +637,10 @@ func (client VirtualMachinesClient) GetResponder(resp *http.Response) (result La
// List list virtual machines in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. expand is specify the $expand query. Example:
// 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)'
// filter is the filter to apply to the operation. top is the maximum number of
// resources to return from the operation. orderby is the ordering expression
// for the results, using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' filter is the filter
// to apply to the operation. top is the maximum number of resources to return from the operation. orderby is the
// ordering expression for the results, using OData notation.
func (client VirtualMachinesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabVirtualMachine, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -743,10 +739,55 @@ func (client VirtualMachinesClient) ListNextResults(lastResults ResponseWithCont
return
}
// ListComplete gets all elements from the list without paging.
func (client VirtualMachinesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan LabVirtualMachine, <-chan error) {
resultChan := make(chan LabVirtualMachine)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
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
}
// ListApplicableSchedules lists all applicable schedules
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine.
func (client VirtualMachinesClient) ListApplicableSchedules(resourceGroupName string, labName string, name string) (result ApplicableSchedule, err error) {
req, err := client.ListApplicableSchedulesPreparer(resourceGroupName, labName, name)
if err != nil {
@@ -810,13 +851,12 @@ func (client VirtualMachinesClient) ListApplicableSchedulesResponder(resp *http.
return
}
// Start start a virtual machine. This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Start start a virtual machine. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine.
func (client VirtualMachinesClient) Start(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -824,8 +864,10 @@ func (client VirtualMachinesClient) Start(resourceGroupName string, labName stri
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -892,13 +934,12 @@ func (client VirtualMachinesClient) StartResponder(resp *http.Response) (result
return
}
// Stop stop a virtual machine This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Stop stop a virtual machine This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine.
func (client VirtualMachinesClient) Stop(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -906,8 +947,10 @@ func (client VirtualMachinesClient) Stop(resourceGroupName string, labName strin
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -976,9 +1019,8 @@ func (client VirtualMachinesClient) StopResponder(resp *http.Response) (result a
// Update modify properties of virtual machines.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual machine. labVirtualMachine is a
// virtual machine.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// machine. labVirtualMachine is a virtual machine.
func (client VirtualMachinesClient) Update(resourceGroupName string, labName string, name string, labVirtualMachine LabVirtualMachineFragment) (result LabVirtualMachine, err error) {
req, err := client.UpdatePreparer(resourceGroupName, labName, name, labVirtualMachine)
if err != nil {
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -30,23 +29,20 @@ type VirtualMachineSchedulesClient struct {
ManagementClient
}
// NewVirtualMachineSchedulesClient creates an instance of the
// VirtualMachineSchedulesClient client.
// NewVirtualMachineSchedulesClient creates an instance of the VirtualMachineSchedulesClient client.
func NewVirtualMachineSchedulesClient(subscriptionID string) VirtualMachineSchedulesClient {
return NewVirtualMachineSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewVirtualMachineSchedulesClientWithBaseURI creates an instance of the
// VirtualMachineSchedulesClient client.
// NewVirtualMachineSchedulesClientWithBaseURI creates an instance of the VirtualMachineSchedulesClient client.
func NewVirtualMachineSchedulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSchedulesClient {
return VirtualMachineSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing schedule.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. virtualMachineName is the name of the virtual machine. name is the
// name of the schedule. schedule is a schedule.
// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name
// of the virtual machine. name is the name of the schedule. schedule is a schedule.
func (client VirtualMachineSchedulesClient) CreateOrUpdate(resourceGroupName string, labName string, virtualMachineName string, name string, schedule Schedule) (result Schedule, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: schedule,
@@ -121,9 +117,8 @@ func (client VirtualMachineSchedulesClient) CreateOrUpdateResponder(resp *http.R
// Delete delete schedule.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. virtualMachineName is the name of the virtual machine. name is the
// name of the schedule.
// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name
// of the virtual machine. name is the name of the schedule.
func (client VirtualMachineSchedulesClient) Delete(resourceGroupName string, labName string, virtualMachineName string, name string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, labName, virtualMachineName, name)
if err != nil {
@@ -187,14 +182,12 @@ func (client VirtualMachineSchedulesClient) DeleteResponder(resp *http.Response)
return
}
// Execute execute a schedule. This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Execute execute a schedule. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. virtualMachineName is the name of the virtual machine. name is the
// name of the schedule.
// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name
// of the virtual machine. name is the name of the schedule.
func (client VirtualMachineSchedulesClient) Execute(resourceGroupName string, labName string, virtualMachineName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -202,8 +195,10 @@ func (client VirtualMachineSchedulesClient) Execute(resourceGroupName string, la
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -273,9 +268,8 @@ func (client VirtualMachineSchedulesClient) ExecuteResponder(resp *http.Response
// Get get schedule.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. virtualMachineName is the name of the virtual machine. name is the
// name of the schedule. expand is specify the $expand query. Example:
// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name
// of the virtual machine. name is the name of the schedule. expand is specify the $expand query. Example:
// 'properties($select=status)'
func (client VirtualMachineSchedulesClient) Get(resourceGroupName string, labName string, virtualMachineName string, name string, expand string) (result Schedule, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, virtualMachineName, name, expand)
@@ -346,12 +340,10 @@ func (client VirtualMachineSchedulesClient) GetResponder(resp *http.Response) (r
// List list schedules in a given virtual machine.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. virtualMachineName is the name of the virtual machine. expand is
// specify the $expand query. Example: 'properties($select=status)' filter is
// the filter to apply to the operation. top is the maximum number of resources
// to return from the operation. orderby is the ordering expression for the
// results, using OData notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name
// of the virtual machine. expand is specify the $expand query. Example: 'properties($select=status)' filter is the
// filter to apply to the operation. top is the maximum number of resources to return from the operation. orderby is
// the ordering expression for the results, using OData notation.
func (client VirtualMachineSchedulesClient) List(resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedule, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby)
if err != nil {
@@ -451,11 +443,55 @@ func (client VirtualMachineSchedulesClient) ListNextResults(lastResults Response
return
}
// ListComplete gets all elements from the list without paging.
func (client VirtualMachineSchedulesClient) ListComplete(resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) {
resultChan := make(chan Schedule)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby)
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
}
// Update modify properties of schedules.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. virtualMachineName is the name of the virtual machine. name is the
// name of the schedule. schedule is a schedule.
// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name
// of the virtual machine. name is the name of the schedule. schedule is a schedule.
func (client VirtualMachineSchedulesClient) Update(resourceGroupName string, labName string, virtualMachineName string, name string, schedule ScheduleFragment) (result Schedule, err error) {
req, err := client.UpdatePreparer(resourceGroupName, labName, virtualMachineName, name, schedule)
if err != nil {
+71 -32
View File
@@ -14,9 +14,8 @@ package devtestlabs
// 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"
@@ -29,26 +28,22 @@ type VirtualNetworksClient struct {
ManagementClient
}
// NewVirtualNetworksClient creates an instance of the VirtualNetworksClient
// client.
// NewVirtualNetworksClient creates an instance of the VirtualNetworksClient client.
func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient {
return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewVirtualNetworksClientWithBaseURI creates an instance of the
// VirtualNetworksClient client.
// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client.
func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworksClient {
return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or replace an existing virtual network. This operation
// can take a while to complete. This method may poll for completion. Polling
// can be canceled by passing the cancel channel argument. The channel will be
// CreateOrUpdate create or replace an existing virtual network. This operation can take a while to complete. This
// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be
// used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual network. virtualNetwork is a
// virtual network.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// network. virtualNetwork is a virtual network.
func (client VirtualNetworksClient) CreateOrUpdate(resourceGroupName string, labName string, name string, virtualNetwork VirtualNetwork, cancel <-chan struct{}) (<-chan VirtualNetwork, <-chan error) {
resultChan := make(chan VirtualNetwork, 1)
errChan := make(chan error, 1)
@@ -56,8 +51,10 @@ func (client VirtualNetworksClient) CreateOrUpdate(resourceGroupName string, lab
var err error
var result VirtualNetwork
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -127,13 +124,12 @@ func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response)
return
}
// Delete delete virtual network. This operation can take a while to complete.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// Delete delete virtual network. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual network.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// network.
func (client VirtualNetworksClient) Delete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -141,8 +137,10 @@ func (client VirtualNetworksClient) Delete(resourceGroupName string, labName str
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -211,9 +209,8 @@ func (client VirtualNetworksClient) DeleteResponder(resp *http.Response) (result
// Get get virtual network.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual network. expand is specify the
// $expand query. Example: 'properties($expand=externalSubnets)'
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// network. expand is specify the $expand query. Example: 'properties($expand=externalSubnets)'
func (client VirtualNetworksClient) Get(resourceGroupName string, labName string, name string, expand string) (result VirtualNetwork, err error) {
req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
if err != nil {
@@ -282,12 +279,10 @@ func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result Vi
// List list virtual networks in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. expand is specify the $expand query. Example:
// 'properties($expand=externalSubnets)' filter is the filter to apply to the
// operation. top is the maximum number of resources to return from the
// operation. orderby is the ordering expression for the results, using OData
// notation.
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($expand=externalSubnets)' filter is the filter to apply to the operation. top is the
// maximum number of resources to return from the operation. orderby is the ordering expression for the results, using
// OData notation.
func (client VirtualNetworksClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationVirtualNetwork, err error) {
req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -386,11 +381,55 @@ func (client VirtualNetworksClient) ListNextResults(lastResults ResponseWithCont
return
}
// ListComplete gets all elements from the list without paging.
func (client VirtualNetworksClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan VirtualNetwork, <-chan error) {
resultChan := make(chan VirtualNetwork)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
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
}
// Update modify properties of virtual networks.
//
// resourceGroupName is the name of the resource group. labName is the name of
// the lab. name is the name of the virtual network. virtualNetwork is a
// virtual network.
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// network. virtualNetwork is a virtual network.
func (client VirtualNetworksClient) Update(resourceGroupName string, labName string, name string, virtualNetwork VirtualNetworkFragment) (result VirtualNetwork, err error) {
req, err := client.UpdatePreparer(resourceGroupName, labName, name, virtualNetwork)
if err != nil {