vendor: update all dependencies to latest versions
This commit is contained in:
+64
-24
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// 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"
|
||||
@@ -24,7 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ApplicationsClient is the the HDInsight Management Client.
|
||||
// ApplicationsClient is the hDInsight Management Client
|
||||
type ApplicationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -34,17 +33,15 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient {
|
||||
return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewApplicationsClientWithBaseURI creates an instance of the
|
||||
// ApplicationsClient client.
|
||||
// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client.
|
||||
func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient {
|
||||
return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create the operation creates applications for the HDInsight cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. applicationName is the constant value for the
|
||||
// applicationName parameters is the application create request.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. applicationName is the
|
||||
// constant value for the applicationName parameters is the application create request.
|
||||
func (client ApplicationsClient) Create(resourceGroupName string, clusterName string, applicationName string, parameters ApplicationGetProperties) (result Application, err error) {
|
||||
req, err := client.CreatePreparer(resourceGroupName, clusterName, applicationName, parameters)
|
||||
if err != nil {
|
||||
@@ -110,14 +107,12 @@ func (client ApplicationsClient) CreateResponder(resp *http.Response) (result Ap
|
||||
return
|
||||
}
|
||||
|
||||
// Delete lists all of the applications HDInsight cluster. 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 lists all of the applications HDInsight cluster. 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. clusterName is the name
|
||||
// of the cluster. applicationName is the constant value for the
|
||||
// applicationName.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. applicationName is the
|
||||
// constant value for the applicationName.
|
||||
func (client ApplicationsClient) Delete(resourceGroupName string, clusterName string, applicationName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -125,8 +120,10 @@ func (client ApplicationsClient) Delete(resourceGroupName string, clusterName st
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -195,10 +192,9 @@ func (client ApplicationsClient) DeleteResponder(resp *http.Response) (result au
|
||||
|
||||
// Get lists properties of the application.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. applicationName is the constant value for the
|
||||
// applicationName
|
||||
func (client ApplicationsClient) Get(resourceGroupName string, clusterName string, applicationName string) (result Application, err error) {
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. applicationName is the
|
||||
// constant value for the applicationName
|
||||
func (client ApplicationsClient) Get(resourceGroupName string, clusterName string, applicationName ApplicationName) (result Application, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, clusterName, applicationName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "hdinsight.ApplicationsClient", "Get", nil, "Failure preparing request")
|
||||
@@ -221,7 +217,7 @@ func (client ApplicationsClient) Get(resourceGroupName string, clusterName strin
|
||||
}
|
||||
|
||||
// GetPreparer prepares the Get request.
|
||||
func (client ApplicationsClient) GetPreparer(resourceGroupName string, clusterName string, applicationName string) (*http.Request, error) {
|
||||
func (client ApplicationsClient) GetPreparer(resourceGroupName string, clusterName string, applicationName ApplicationName) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"applicationName": autorest.Encode("path", applicationName),
|
||||
"clusterName": autorest.Encode("path", clusterName),
|
||||
@@ -263,8 +259,7 @@ func (client ApplicationsClient) GetResponder(resp *http.Response) (result Appli
|
||||
|
||||
// List lists all of the applications HDInsight cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster.
|
||||
func (client ApplicationsClient) List(resourceGroupName string, clusterName string) (result ApplicationListResult, err error) {
|
||||
req, err := client.ListPreparer(resourceGroupName, clusterName)
|
||||
if err != nil {
|
||||
@@ -350,3 +345,48 @@ func (client ApplicationsClient) ListNextResults(lastResults ApplicationListResu
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ApplicationsClient) ListComplete(resourceGroupName string, clusterName string, cancel <-chan struct{}) (<-chan Application, <-chan error) {
|
||||
resultChan := make(chan Application)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(resourceGroupName, clusterName)
|
||||
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
|
||||
}
|
||||
|
||||
+4
-5
@@ -1,6 +1,6 @@
|
||||
// Package hdinsight implements the Azure ARM Hdinsight service API version .
|
||||
// Package hdinsight implements the Azure ARM Hdinsight service API version 2015-03-01-preview.
|
||||
//
|
||||
// The HDInsight Management Client.
|
||||
// HDInsight Management Client
|
||||
package hdinsight
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
@@ -17,9 +17,8 @@ package hdinsight
|
||||
// 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"
|
||||
|
||||
+134
-44
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,7 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ClustersClient is the the HDInsight Management Client.
|
||||
// ClustersClient is the hDInsight Management Client
|
||||
type ClustersClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,19 +34,17 @@ func NewClustersClient(subscriptionID string) ClustersClient {
|
||||
return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewClustersClientWithBaseURI creates an instance of the ClustersClient
|
||||
// client.
|
||||
// NewClustersClientWithBaseURI creates an instance of the ClustersClient client.
|
||||
func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient {
|
||||
return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// ChangeRdpSettings begins changing the RDP settings on the specified cluster.
|
||||
// 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
|
||||
// ChangeRdpSettings begins changing the RDP settings on the specified cluster. 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. clusterName is the name
|
||||
// of the cluster. parameters is the OS profile for RDP.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the OS
|
||||
// profile for RDP.
|
||||
func (client ClustersClient) ChangeRdpSettings(resourceGroupName string, clusterName string, parameters RDPSettingsParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -66,8 +63,10 @@ func (client ClustersClient) ChangeRdpSettings(resourceGroupName string, cluster
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -135,13 +134,12 @@ func (client ClustersClient) ChangeRdpSettingsResponder(resp *http.Response) (re
|
||||
return
|
||||
}
|
||||
|
||||
// Create begins creating a new HDInsight cluster with the specified
|
||||
// parameters. 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.
|
||||
// Create begins creating a new HDInsight cluster with the specified parameters. 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. clusterName is the name
|
||||
// of the cluster. parameters is the cluster create request.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the
|
||||
// cluster create request.
|
||||
func (client ClustersClient) Create(resourceGroupName string, clusterName string, parameters ClusterCreateParametersExtended, cancel <-chan struct{}) (<-chan Cluster, <-chan error) {
|
||||
resultChan := make(chan Cluster, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -149,8 +147,10 @@ func (client ClustersClient) Create(resourceGroupName string, clusterName string
|
||||
var err error
|
||||
var result Cluster
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -219,13 +219,11 @@ func (client ClustersClient) CreateResponder(resp *http.Response) (result Cluste
|
||||
return
|
||||
}
|
||||
|
||||
// Delete begins deleting the specified HDInsight cluster. 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 begins deleting the specified HDInsight cluster. 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. clusterName is the name
|
||||
// of the cluster.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster.
|
||||
func (client ClustersClient) Delete(resourceGroupName string, clusterName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -233,8 +231,10 @@ func (client ClustersClient) Delete(resourceGroupName string, clusterName string
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -300,13 +300,12 @@ func (client ClustersClient) DeleteResponder(resp *http.Response) (result autore
|
||||
return
|
||||
}
|
||||
|
||||
// ExecuteScriptActions begins executing script actions on the specified
|
||||
// HDInsight cluster. 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.
|
||||
// ExecuteScriptActions begins executing script actions on the specified HDInsight cluster. 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. clusterName is the name
|
||||
// of the cluster. parameters is the parameters for executing script actions.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the
|
||||
// parameters for executing script actions.
|
||||
func (client ClustersClient) ExecuteScriptActions(resourceGroupName string, clusterName string, parameters ExecuteScriptActionParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -323,8 +322,10 @@ func (client ClustersClient) ExecuteScriptActions(resourceGroupName string, clus
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -394,8 +395,7 @@ func (client ClustersClient) ExecuteScriptActionsResponder(resp *http.Response)
|
||||
|
||||
// Get gets the specified cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster.
|
||||
func (client ClustersClient) Get(resourceGroupName string, clusterName string) (result Cluster, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, clusterName)
|
||||
if err != nil {
|
||||
@@ -543,6 +543,51 @@ func (client ClustersClient) ListNextResults(lastResults ClusterListResult) (res
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ClustersClient) ListComplete(cancel <-chan struct{}) (<-chan Cluster, <-chan error) {
|
||||
resultChan := make(chan Cluster)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.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
|
||||
}
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
// ListByResourceGroup list the HDInsight clusters in a resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group.
|
||||
@@ -631,14 +676,57 @@ func (client ClustersClient) ListByResourceGroupNextResults(lastResults ClusterL
|
||||
return
|
||||
}
|
||||
|
||||
// Resize begins a resize operation on the specified HDInsight cluster. 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
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client ClustersClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Cluster, <-chan error) {
|
||||
resultChan := make(chan Cluster)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByResourceGroup(resourceGroupName)
|
||||
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
|
||||
}
|
||||
|
||||
// Resize begins a resize operation on the specified HDInsight cluster. 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. clusterName is the name
|
||||
// of the cluster. roleName is the constant value for the roleName parameters
|
||||
// is the parameters for the resize operation.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. roleName is the
|
||||
// constant value for the roleName parameters is the parameters for the resize operation.
|
||||
func (client ClustersClient) Resize(resourceGroupName string, clusterName string, roleName string, parameters ClusterResizeParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -646,8 +734,10 @@ func (client ClustersClient) Resize(resourceGroupName string, clusterName string
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -718,8 +808,8 @@ func (client ClustersClient) ResizeResponder(resp *http.Response) (result autore
|
||||
|
||||
// Update patch HDInsight cluster with the specified parameters.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. parameters is the cluster patch request.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the
|
||||
// cluster patch request.
|
||||
func (client ClustersClient) Update(resourceGroupName string, clusterName string, parameters ClusterPatchParameters) (result Cluster, err error) {
|
||||
req, err := client.UpdatePreparer(resourceGroupName, clusterName, parameters)
|
||||
if err != nil {
|
||||
|
||||
+14
-18
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// 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"
|
||||
@@ -24,28 +23,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ConfigurationsClient is the the HDInsight Management Client.
|
||||
// ConfigurationsClient is the hDInsight Management Client
|
||||
type ConfigurationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewConfigurationsClient creates an instance of the ConfigurationsClient
|
||||
// client.
|
||||
// NewConfigurationsClient creates an instance of the ConfigurationsClient client.
|
||||
func NewConfigurationsClient(subscriptionID string) ConfigurationsClient {
|
||||
return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewConfigurationsClientWithBaseURI creates an instance of the
|
||||
// ConfigurationsClient client.
|
||||
// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client.
|
||||
func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient {
|
||||
return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get the configuration object for the specified cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. configurationName is the constant for configuration type of
|
||||
// gateway.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. configurationName is
|
||||
// the constant for configuration type of gateway.
|
||||
func (client ConfigurationsClient) Get(resourceGroupName string, clusterName string, configurationName Configurationname) (result HTTPConnectivitySettings, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, clusterName, configurationName)
|
||||
if err != nil {
|
||||
@@ -109,14 +105,12 @@ func (client ConfigurationsClient) GetResponder(resp *http.Response) (result HTT
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateHTTPSettings begins configuring the HTTP settings on the specified
|
||||
// cluster. This method may poll for completion. Polling can be canceled by
|
||||
// passing the cancel channel argument. The channel will be used to cancel
|
||||
// UpdateHTTPSettings begins configuring the HTTP settings on the specified cluster. 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. clusterName is the name
|
||||
// of the cluster. configurationName is the constant for configuration type of
|
||||
// gateway. parameters is the name of the resource group.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. configurationName is
|
||||
// the constant for configuration type of gateway. parameters is the name of the resource group.
|
||||
func (client ConfigurationsClient) UpdateHTTPSettings(resourceGroupName string, clusterName string, configurationName string, parameters HTTPConnectivitySettings, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -124,8 +118,10 @@ func (client ConfigurationsClient) UpdateHTTPSettings(resourceGroupName string,
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
||||
+10
-13
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// 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"
|
||||
@@ -24,7 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ExtensionClient is the the HDInsight Management Client.
|
||||
// ExtensionClient is the hDInsight Management Client
|
||||
type ExtensionClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -34,17 +33,15 @@ func NewExtensionClient(subscriptionID string) ExtensionClient {
|
||||
return NewExtensionClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewExtensionClientWithBaseURI creates an instance of the ExtensionClient
|
||||
// client.
|
||||
// NewExtensionClientWithBaseURI creates an instance of the ExtensionClient client.
|
||||
func NewExtensionClientWithBaseURI(baseURI string, subscriptionID string) ExtensionClient {
|
||||
return ExtensionClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create create HDInsight cluster extension.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. parameters is the cluster extensions create request.
|
||||
// extensionName is the name of the cluster extension.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the
|
||||
// cluster extensions create request. extensionName is the name of the cluster extension.
|
||||
func (client ExtensionClient) Create(resourceGroupName string, clusterName string, parameters Extension, extensionName string) (result autorest.Response, err error) {
|
||||
req, err := client.CreatePreparer(resourceGroupName, clusterName, parameters, extensionName)
|
||||
if err != nil {
|
||||
@@ -111,8 +108,8 @@ func (client ExtensionClient) CreateResponder(resp *http.Response) (result autor
|
||||
|
||||
// Delete delete extension for HDInsight cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. extensionName is the name of the cluster extension.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. extensionName is the
|
||||
// name of the cluster extension.
|
||||
func (client ExtensionClient) Delete(resourceGroupName string, clusterName string, extensionName string) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, clusterName, extensionName)
|
||||
if err != nil {
|
||||
@@ -177,8 +174,8 @@ func (client ExtensionClient) DeleteResponder(resp *http.Response) (result autor
|
||||
|
||||
// Get get extension properties for HDInsight cluster extension.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. extensionName is the name of the cluster extension.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. extensionName is the
|
||||
// name of the cluster extension.
|
||||
func (client ExtensionClient) Get(resourceGroupName string, clusterName string, extensionName string) (result Extension, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, clusterName, extensionName)
|
||||
if err != nil {
|
||||
|
||||
+4
-6
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// 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"
|
||||
@@ -24,7 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// LocationClient is the the HDInsight Management Client.
|
||||
// LocationClient is the hDInsight Management Client
|
||||
type LocationClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -34,8 +33,7 @@ func NewLocationClient(subscriptionID string) LocationClient {
|
||||
return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewLocationClientWithBaseURI creates an instance of the LocationClient
|
||||
// client.
|
||||
// NewLocationClientWithBaseURI creates an instance of the LocationClient client.
|
||||
func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient {
|
||||
return LocationClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
+33
-46
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,6 +24,9 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ApplicationName enumerates the values for application name.
|
||||
type ApplicationName string
|
||||
|
||||
// AsyncOperationState enumerates the values for async operation state.
|
||||
type AsyncOperationState string
|
||||
|
||||
@@ -37,25 +39,23 @@ const (
|
||||
Succeeded AsyncOperationState = "Succeeded"
|
||||
)
|
||||
|
||||
// ClusterProvisioningState enumerates the values for cluster provisioning
|
||||
// state.
|
||||
// ClusterProvisioningState enumerates the values for cluster provisioning state.
|
||||
type ClusterProvisioningState string
|
||||
|
||||
const (
|
||||
// ClusterProvisioningStateCanceled specifies the cluster provisioning
|
||||
// state canceled state for cluster provisioning state.
|
||||
// ClusterProvisioningStateCanceled specifies the cluster provisioning state canceled state for cluster provisioning
|
||||
// state.
|
||||
ClusterProvisioningStateCanceled ClusterProvisioningState = "Canceled"
|
||||
// ClusterProvisioningStateDeleting specifies the cluster provisioning
|
||||
// state deleting state for cluster provisioning state.
|
||||
// ClusterProvisioningStateDeleting specifies the cluster provisioning state deleting state for cluster provisioning
|
||||
// state.
|
||||
ClusterProvisioningStateDeleting ClusterProvisioningState = "Deleting"
|
||||
// ClusterProvisioningStateFailed specifies the cluster provisioning state
|
||||
// failed state for cluster provisioning state.
|
||||
// ClusterProvisioningStateFailed specifies the cluster provisioning state failed state for cluster provisioning state.
|
||||
ClusterProvisioningStateFailed ClusterProvisioningState = "Failed"
|
||||
// ClusterProvisioningStateInProgress specifies the cluster provisioning
|
||||
// state in progress state for cluster provisioning state.
|
||||
// ClusterProvisioningStateInProgress specifies the cluster provisioning state in progress state for cluster
|
||||
// provisioning state.
|
||||
ClusterProvisioningStateInProgress ClusterProvisioningState = "InProgress"
|
||||
// ClusterProvisioningStateSucceeded specifies the cluster provisioning
|
||||
// state succeeded state for cluster provisioning state.
|
||||
// ClusterProvisioningStateSucceeded specifies the cluster provisioning state succeeded state for cluster provisioning
|
||||
// state.
|
||||
ClusterProvisioningStateSucceeded ClusterProvisioningState = "Succeeded"
|
||||
)
|
||||
|
||||
@@ -140,9 +140,8 @@ type ApplicationGetProperties struct {
|
||||
AdditionalProperties *string `json:"additionalProperties,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationListResult is result of the request to list cluster Applications.
|
||||
// It contains a list of operations and a URL link to get the next set of
|
||||
// results.
|
||||
// ApplicationListResult is result of the request to list cluster Applications. It contains a list of operations and a
|
||||
// URL link to get the next set of results.
|
||||
type ApplicationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Application `json:"value,omitempty"`
|
||||
@@ -226,8 +225,7 @@ type ClusterGetProperties struct {
|
||||
ConnectivityEndpoints *[]ConnectivityEndpoint `json:"connectivityEndpoints,omitempty"`
|
||||
}
|
||||
|
||||
// ClusterListPersistedScriptActionsResult is list PersistedScriptActions
|
||||
// operations response.
|
||||
// ClusterListPersistedScriptActionsResult is list PersistedScriptActions operations response.
|
||||
type ClusterListPersistedScriptActionsResult struct {
|
||||
Value *[]RuntimeScriptAction `json:"value,omitempty"`
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
@@ -252,8 +250,7 @@ func (client ClusterListResult) ClusterListResultPreparer() (*http.Request, erro
|
||||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// ClusterListRuntimeScriptActionDetailResult is the ListScriptExecutionHistory
|
||||
// response.
|
||||
// ClusterListRuntimeScriptActionDetailResult is the ListScriptExecutionHistory response.
|
||||
type ClusterListRuntimeScriptActionDetailResult struct {
|
||||
Value *[]RuntimeScriptActionDetail `json:"value,omitempty"`
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
@@ -288,8 +285,7 @@ type Errors struct {
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// ExecuteScriptActionParameters is describes the script actions on a running
|
||||
// cluster.
|
||||
// ExecuteScriptActionParameters is describes the script actions on a running cluster.
|
||||
type ExecuteScriptActionParameters struct {
|
||||
ScriptActions *[]RuntimeScriptAction `json:"scriptActions,omitempty"`
|
||||
PersistOnSuccess *string `json:"persistOnSuccess,omitempty"`
|
||||
@@ -307,8 +303,7 @@ type HardwareProfile struct {
|
||||
VMSize *string `json:"vmSize,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPConnectivitySettings is the payload for a Configure HTTP settings
|
||||
// request.
|
||||
// HTTPConnectivitySettings is the payload for a Configure HTTP settings request.
|
||||
type HTTPConnectivitySettings struct {
|
||||
autorest.Response `json:"-"`
|
||||
EnabledCredential *string `json:"restAuthCredential.isEnabled,omitempty"`
|
||||
@@ -318,13 +313,12 @@ type HTTPConnectivitySettings struct {
|
||||
|
||||
// HTTPSettingsParameters is the payload for a Configure HTTP settings request.
|
||||
type HTTPSettingsParameters struct {
|
||||
RestAuthCredentialisEnabled *string `json:"restAuthCredential.isEnabled,omitempty"`
|
||||
RestAuthCredentialusername *string `json:"restAuthCredential.username,omitempty"`
|
||||
RestAuthCredentialpassword *string `json:"restAuthCredential.password,omitempty"`
|
||||
RestAuthCredentialIsEnabled *string `json:"restAuthCredential.isEnabled,omitempty"`
|
||||
RestAuthCredentialUsername *string `json:"restAuthCredential.username,omitempty"`
|
||||
RestAuthCredentialPassword *string `json:"restAuthCredential.password,omitempty"`
|
||||
}
|
||||
|
||||
// LinuxOperatingSystemProfile is the ssh username, password, and ssh public
|
||||
// key.
|
||||
// LinuxOperatingSystemProfile is the ssh username, password, and ssh public key.
|
||||
type LinuxOperatingSystemProfile struct {
|
||||
Username *string `json:"username,omitempty"`
|
||||
Password *string `json:"password,omitempty"`
|
||||
@@ -344,9 +338,8 @@ type OperationDisplay struct {
|
||||
Operation *string `json:"operation,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is result of the request to list HDInsight operations.
|
||||
// It contains a list of operations and a URL link to get the next set of
|
||||
// results.
|
||||
// OperationListResult is result of the request to list HDInsight operations. It contains a list of operations and a
|
||||
// URL link to get the next set of results.
|
||||
type OperationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Operation `json:"value,omitempty"`
|
||||
@@ -371,8 +364,7 @@ type OperationResource struct {
|
||||
Error *Errors `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// OsProfile is the Windows operation systems profile, and configure remote
|
||||
// desktop settings.
|
||||
// OsProfile is the Windows operation systems profile, and configure remote desktop settings.
|
||||
type OsProfile struct {
|
||||
WindowsOperatingSystemProfile *WindowsOperatingSystemProfile `json:"windowsOperatingSystemProfile,omitempty"`
|
||||
LinuxOperatingSystemProfile *LinuxOperatingSystemProfile `json:"linuxOperatingSystemProfile,omitempty"`
|
||||
@@ -395,8 +387,7 @@ type RdpSettings struct {
|
||||
ExpiryDate *date.Date `json:"expiryDate,omitempty"`
|
||||
}
|
||||
|
||||
// RDPSettingsParameters is parameters specifying the data factory gateway
|
||||
// definition for a create or update operation.
|
||||
// RDPSettingsParameters is parameters specifying the data factory gateway definition for a create or update operation.
|
||||
type RDPSettingsParameters struct {
|
||||
OsProfile *OsProfile `json:"osProfile,omitempty"`
|
||||
}
|
||||
@@ -442,8 +433,7 @@ type RuntimeScriptAction struct {
|
||||
ApplicationName *string `json:"applicationName,omitempty"`
|
||||
}
|
||||
|
||||
// RuntimeScriptActionDetail is describes the execution details of a script
|
||||
// action.
|
||||
// RuntimeScriptActionDetail is describes the execution details of a script action.
|
||||
type RuntimeScriptActionDetail struct {
|
||||
autorest.Response `json:"-"`
|
||||
ScriptExecutionID *int64 `json:"scriptExecutionId,omitempty"`
|
||||
@@ -486,15 +476,13 @@ func (client ScriptActionExecutionHistoryList) ScriptActionExecutionHistoryListP
|
||||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// ScriptActionExecutionSummary is describes the execution summary of a script
|
||||
// action.
|
||||
// ScriptActionExecutionSummary is describes the execution summary of a script action.
|
||||
type ScriptActionExecutionSummary struct {
|
||||
Status *string `json:"status,omitempty"`
|
||||
InstanceCount *int32 `json:"instanceCount,omitempty"`
|
||||
}
|
||||
|
||||
// ScriptActionPersistedGetResponseSpec is the persisted script action for
|
||||
// cluster
|
||||
// ScriptActionPersistedGetResponseSpec is the persisted script action for cluster
|
||||
type ScriptActionPersistedGetResponseSpec struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
URI *string `json:"uri,omitempty"`
|
||||
@@ -522,8 +510,7 @@ func (client ScriptActionsList) ScriptActionsListPreparer() (*http.Request, erro
|
||||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// SecurityProfile is the security profile which contains Ssh public key for
|
||||
// the HDInsight cluster.
|
||||
// SecurityProfile is the security profile which contains Ssh public key for the HDInsight cluster.
|
||||
type SecurityProfile struct {
|
||||
DirectoryType DirectoryType `json:"directoryType,omitempty"`
|
||||
Domain *string `json:"domain,omitempty"`
|
||||
|
||||
+49
-6
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// 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"
|
||||
@@ -24,7 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the the HDInsight Management Client.
|
||||
// OperationsClient is the hDInsight Management Client
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
|
||||
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
|
||||
// client.
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
|
||||
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
|
||||
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
@@ -120,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) {
|
||||
resultChan := make(chan Operation)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.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
|
||||
}
|
||||
}
|
||||
}
|
||||
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
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// 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"
|
||||
@@ -24,27 +23,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ScriptActionsClient is the the HDInsight Management Client.
|
||||
// ScriptActionsClient is the hDInsight Management Client
|
||||
type ScriptActionsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewScriptActionsClient creates an instance of the ScriptActionsClient
|
||||
// client.
|
||||
// NewScriptActionsClient creates an instance of the ScriptActionsClient client.
|
||||
func NewScriptActionsClient(subscriptionID string) ScriptActionsClient {
|
||||
return NewScriptActionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewScriptActionsClientWithBaseURI creates an instance of the
|
||||
// ScriptActionsClient client.
|
||||
// NewScriptActionsClientWithBaseURI creates an instance of the ScriptActionsClient client.
|
||||
func NewScriptActionsClientWithBaseURI(baseURI string, subscriptionID string) ScriptActionsClient {
|
||||
return ScriptActionsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Delete deletes a given persisted script action of the cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. scriptName is the name of the script.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. scriptName is the name
|
||||
// of the script.
|
||||
func (client ScriptActionsClient) Delete(resourceGroupName string, clusterName string, scriptName string) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, clusterName, scriptName)
|
||||
if err != nil {
|
||||
@@ -109,8 +106,7 @@ func (client ScriptActionsClient) DeleteResponder(resp *http.Response) (result a
|
||||
|
||||
// List lists all persisted script actions for the given cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster.
|
||||
func (client ScriptActionsClient) List(resourceGroupName string, clusterName string) (result ScriptActionsList, err error) {
|
||||
req, err := client.ListPreparer(resourceGroupName, clusterName)
|
||||
if err != nil {
|
||||
@@ -196,3 +192,48 @@ func (client ScriptActionsClient) ListNextResults(lastResults ScriptActionsList)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ScriptActionsClient) ListComplete(resourceGroupName string, clusterName string, cancel <-chan struct{}) (<-chan RuntimeScriptActionDetail, <-chan error) {
|
||||
resultChan := make(chan RuntimeScriptActionDetail)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(resourceGroupName, clusterName)
|
||||
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
|
||||
}
|
||||
|
||||
+55
-14
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// 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"
|
||||
@@ -24,27 +23,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ScriptExecutionHistoryClient is the the HDInsight Management Client.
|
||||
// ScriptExecutionHistoryClient is the hDInsight Management Client
|
||||
type ScriptExecutionHistoryClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewScriptExecutionHistoryClient creates an instance of the
|
||||
// ScriptExecutionHistoryClient client.
|
||||
// NewScriptExecutionHistoryClient creates an instance of the ScriptExecutionHistoryClient client.
|
||||
func NewScriptExecutionHistoryClient(subscriptionID string) ScriptExecutionHistoryClient {
|
||||
return NewScriptExecutionHistoryClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewScriptExecutionHistoryClientWithBaseURI creates an instance of the
|
||||
// ScriptExecutionHistoryClient client.
|
||||
// NewScriptExecutionHistoryClientWithBaseURI creates an instance of the ScriptExecutionHistoryClient client.
|
||||
func NewScriptExecutionHistoryClientWithBaseURI(baseURI string, subscriptionID string) ScriptExecutionHistoryClient {
|
||||
return ScriptExecutionHistoryClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get gets the script execution detail for the given script execution id.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. scriptExecutionID is the script execution Id
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. scriptExecutionID is
|
||||
// the script execution Id
|
||||
func (client ScriptExecutionHistoryClient) Get(resourceGroupName string, clusterName string, scriptExecutionID string) (result RuntimeScriptActionDetail, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, clusterName, scriptExecutionID)
|
||||
if err != nil {
|
||||
@@ -110,8 +107,7 @@ func (client ScriptExecutionHistoryClient) GetResponder(resp *http.Response) (re
|
||||
|
||||
// List lists all scripts execution history for the given cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster.
|
||||
func (client ScriptExecutionHistoryClient) List(resourceGroupName string, clusterName string) (result ScriptActionExecutionHistoryList, err error) {
|
||||
req, err := client.ListPreparer(resourceGroupName, clusterName)
|
||||
if err != nil {
|
||||
@@ -198,10 +194,55 @@ func (client ScriptExecutionHistoryClient) ListNextResults(lastResults ScriptAct
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ScriptExecutionHistoryClient) ListComplete(resourceGroupName string, clusterName string, cancel <-chan struct{}) (<-chan RuntimeScriptActionDetail, <-chan error) {
|
||||
resultChan := make(chan RuntimeScriptActionDetail)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(resourceGroupName, clusterName)
|
||||
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
|
||||
}
|
||||
|
||||
// Promote promote ad-hoc script execution to a persisted script.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. scriptExecutionID is the script execution Id
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. scriptExecutionID is
|
||||
// the script execution Id
|
||||
func (client ScriptExecutionHistoryClient) Promote(resourceGroupName string, clusterName string, scriptExecutionID int64) (result autorest.Response, err error) {
|
||||
req, err := client.PromotePreparer(resourceGroupName, clusterName, scriptExecutionID)
|
||||
if err != nil {
|
||||
|
||||
+4
-5
@@ -14,16 +14,15 @@ package hdinsight
|
||||
// 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-hdinsight/"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-hdinsight/2015-03-01-preview"
|
||||
}
|
||||
|
||||
// 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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user