vendor: update all dependencies to latest versions
This commit is contained in:
+3
-5
@@ -1,5 +1,4 @@
|
||||
// Package servicefabric implements the Azure ARM Servicefabric service API
|
||||
// version 2016-09-01.
|
||||
// Package servicefabric implements the Azure ARM Servicefabric service API version 2016-09-01.
|
||||
//
|
||||
//
|
||||
package servicefabric
|
||||
@@ -18,9 +17,8 @@ package servicefabric
|
||||
// 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"
|
||||
|
||||
+114
-28
@@ -14,9 +14,8 @@ package servicefabric
|
||||
// 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,8 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ClustersClient is the client for the Clusters methods of the Servicefabric
|
||||
// service.
|
||||
// ClustersClient is the client for the Clusters methods of the Servicefabric service.
|
||||
type ClustersClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -36,19 +34,16 @@ 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)}
|
||||
}
|
||||
|
||||
// Create create cluster resource 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 create cluster resource 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 to which the resource
|
||||
// belongs or get created clusterName is the name of the cluster resource
|
||||
// parameters is put Request
|
||||
// resourceGroupName is the name of the resource group to which the resource belongs or get created clusterName is the
|
||||
// name of the cluster resource parameters is put Request
|
||||
func (client ClustersClient) Create(resourceGroupName string, clusterName string, parameters Cluster, cancel <-chan struct{}) (<-chan Cluster, <-chan error) {
|
||||
resultChan := make(chan Cluster, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -111,8 +106,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)
|
||||
}()
|
||||
@@ -183,8 +180,8 @@ func (client ClustersClient) CreateResponder(resp *http.Response) (result Cluste
|
||||
|
||||
// Delete delete cluster resource
|
||||
//
|
||||
// resourceGroupName is the name of the resource group to which the resource
|
||||
// belongs or get created clusterName is the name of the cluster resource
|
||||
// resourceGroupName is the name of the resource group to which the resource belongs or get created clusterName is the
|
||||
// name of the cluster resource
|
||||
func (client ClustersClient) Delete(resourceGroupName string, clusterName string) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, clusterName)
|
||||
if err != nil {
|
||||
@@ -248,8 +245,8 @@ func (client ClustersClient) DeleteResponder(resp *http.Response) (result autore
|
||||
|
||||
// Get get cluster resource
|
||||
//
|
||||
// resourceGroupName is the name of the resource group to which the resource
|
||||
// belongs or get created clusterName is the name of the cluster resource
|
||||
// resourceGroupName is the name of the resource group to which the resource belongs or get created clusterName is the
|
||||
// name of the cluster resource
|
||||
func (client ClustersClient) Get(resourceGroupName string, clusterName string) (result Cluster, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, clusterName)
|
||||
if err != nil {
|
||||
@@ -397,10 +394,54 @@ 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 cluster resource by resource group
|
||||
//
|
||||
// resourceGroupName is the name of the resource group to which the resource
|
||||
// belongs or get created
|
||||
// resourceGroupName is the name of the resource group to which the resource belongs or get created
|
||||
func (client ClustersClient) ListByResourceGroup(resourceGroupName string) (result ClusterListResult, err error) {
|
||||
req, err := client.ListByResourceGroupPreparer(resourceGroupName)
|
||||
if err != nil {
|
||||
@@ -486,14 +527,57 @@ func (client ClustersClient) ListByResourceGroupNextResults(lastResults ClusterL
|
||||
return
|
||||
}
|
||||
|
||||
// Update update cluster configuration 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.
|
||||
// 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
|
||||
}
|
||||
|
||||
// Update update cluster configuration 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 to which the resource
|
||||
// belongs or get created clusterName is the name of the cluster resource
|
||||
// parameters is the parameters which contains the property value and property
|
||||
// name which used to update the cluster configuration
|
||||
// resourceGroupName is the name of the resource group to which the resource belongs or get created clusterName is the
|
||||
// name of the cluster resource parameters is the parameters which contains the property value and property name which
|
||||
// used to update the cluster configuration
|
||||
func (client ClustersClient) Update(resourceGroupName string, clusterName string, parameters ClusterUpdateParameters, cancel <-chan struct{}) (<-chan Cluster, <-chan error) {
|
||||
resultChan := make(chan Cluster, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -501,8 +585,10 @@ func (client ClustersClient) Update(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)
|
||||
}()
|
||||
|
||||
+392
-17
@@ -14,9 +14,8 @@ package servicefabric
|
||||
// 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,31 +23,93 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ClusterVersionsClient is the client for the ClusterVersions methods of the
|
||||
// Servicefabric service.
|
||||
// ClusterVersionsClient is the client for the ClusterVersions methods of the Servicefabric service.
|
||||
type ClusterVersionsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewClusterVersionsClient creates an instance of the ClusterVersionsClient
|
||||
// client.
|
||||
// NewClusterVersionsClient creates an instance of the ClusterVersionsClient client.
|
||||
func NewClusterVersionsClient(subscriptionID string) ClusterVersionsClient {
|
||||
return NewClusterVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewClusterVersionsClientWithBaseURI creates an instance of the
|
||||
// ClusterVersionsClient client.
|
||||
// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client.
|
||||
func NewClusterVersionsClientWithBaseURI(baseURI string, subscriptionID string) ClusterVersionsClient {
|
||||
return ClusterVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get get cluster code versions by environment and version
|
||||
//
|
||||
// location is the location for the cluster code versions, this is different from cluster location environment is
|
||||
// cluster operating system, the default means all clusterVersion is the cluster code version
|
||||
func (client ClusterVersionsClient) Get(location string, environment string, clusterVersion string) (result ClusterCodeVersionsResult, err error) {
|
||||
req, err := client.GetPreparer(location, environment, clusterVersion)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "Get", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.GetSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "Get", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.GetResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "Get", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetPreparer prepares the Get request.
|
||||
func (client ClusterVersionsClient) GetPreparer(location string, environment string, clusterVersion string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"clusterVersion": autorest.Encode("path", clusterVersion),
|
||||
"environment": autorest.Encode("path", environment),
|
||||
"location": autorest.Encode("path", location),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-09-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions/{clusterVersion}", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// GetSender sends the Get request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ClusterVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// GetResponder handles the response to the Get request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ClusterVersionsClient) GetResponder(resp *http.Response) (result ClusterCodeVersionsResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// List list cluster code versions by location
|
||||
//
|
||||
// location is the location for the cluster code versions, this is different
|
||||
// from cluster location environment is cluster operating system, the default
|
||||
// means all
|
||||
func (client ClusterVersionsClient) List(location string, environment string) (result ClusterCodeVersionsListResult, err error) {
|
||||
req, err := client.ListPreparer(location, environment)
|
||||
// location is the location for the cluster code versions, this is different from cluster location
|
||||
func (client ClusterVersionsClient) List(location string) (result ClusterCodeVersionsListResult, err error) {
|
||||
req, err := client.ListPreparer(location)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "List", nil, "Failure preparing request")
|
||||
return
|
||||
@@ -70,9 +131,8 @@ func (client ClusterVersionsClient) List(location string, environment string) (r
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client ClusterVersionsClient) ListPreparer(location string, environment string) (*http.Request, error) {
|
||||
func (client ClusterVersionsClient) ListPreparer(location string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"environment": autorest.Encode("path", environment),
|
||||
"location": autorest.Encode("path", location),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
@@ -85,7 +145,7 @@ func (client ClusterVersionsClient) ListPreparer(location string, environment st
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions", pathParameters),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
@@ -132,3 +192,318 @@ func (client ClusterVersionsClient) ListNextResults(lastResults ClusterCodeVersi
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ClusterVersionsClient) ListComplete(location string, cancel <-chan struct{}) (<-chan ClusterCodeVersionsResult, <-chan error) {
|
||||
resultChan := make(chan ClusterCodeVersionsResult)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(location)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListByEnvironment list cluster code versions by environment
|
||||
//
|
||||
// location is the location for the cluster code versions, this is different from cluster location environment is
|
||||
// cluster operating system, the default means all
|
||||
func (client ClusterVersionsClient) ListByEnvironment(location string, environment string) (result ClusterCodeVersionsListResult, err error) {
|
||||
req, err := client.ListByEnvironmentPreparer(location, environment)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListByEnvironmentSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListByEnvironmentResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByEnvironmentPreparer prepares the ListByEnvironment request.
|
||||
func (client ClusterVersionsClient) ListByEnvironmentPreparer(location string, environment string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"environment": autorest.Encode("path", environment),
|
||||
"location": autorest.Encode("path", location),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-09-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListByEnvironmentSender sends the ListByEnvironment request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ClusterVersionsClient) ListByEnvironmentSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListByEnvironmentResponder handles the response to the ListByEnvironment request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ClusterVersionsClient) ListByEnvironmentResponder(resp *http.Response) (result ClusterCodeVersionsListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListByEnvironmentNextResults retrieves the next set of results, if any.
|
||||
func (client ClusterVersionsClient) ListByEnvironmentNextResults(lastResults ClusterCodeVersionsListResult) (result ClusterCodeVersionsListResult, err error) {
|
||||
req, err := lastResults.ClusterCodeVersionsListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", nil, "Failure preparing next results request")
|
||||
}
|
||||
if req == nil {
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListByEnvironmentSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return result, autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListByEnvironmentResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByEnvironmentComplete gets all elements from the list without paging.
|
||||
func (client ClusterVersionsClient) ListByEnvironmentComplete(location string, environment string, cancel <-chan struct{}) (<-chan ClusterCodeVersionsResult, <-chan error) {
|
||||
resultChan := make(chan ClusterCodeVersionsResult)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByEnvironment(location, environment)
|
||||
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.ListByEnvironmentNextResults(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
|
||||
}
|
||||
|
||||
// ListByVersion list cluster code versions by version
|
||||
//
|
||||
// location is the location for the cluster code versions, this is different from cluster location clusterVersion is
|
||||
// the cluster code version
|
||||
func (client ClusterVersionsClient) ListByVersion(location string, clusterVersion string) (result ClusterCodeVersionsListResult, err error) {
|
||||
req, err := client.ListByVersionPreparer(location, clusterVersion)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListByVersionSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListByVersionResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByVersionPreparer prepares the ListByVersion request.
|
||||
func (client ClusterVersionsClient) ListByVersionPreparer(location string, clusterVersion string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"clusterVersion": autorest.Encode("path", clusterVersion),
|
||||
"location": autorest.Encode("path", location),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-09-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions/{clusterVersion}", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListByVersionSender sends the ListByVersion request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ClusterVersionsClient) ListByVersionSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListByVersionResponder handles the response to the ListByVersion request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ClusterVersionsClient) ListByVersionResponder(resp *http.Response) (result ClusterCodeVersionsListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListByVersionNextResults retrieves the next set of results, if any.
|
||||
func (client ClusterVersionsClient) ListByVersionNextResults(lastResults ClusterCodeVersionsListResult) (result ClusterCodeVersionsListResult, err error) {
|
||||
req, err := lastResults.ClusterCodeVersionsListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", nil, "Failure preparing next results request")
|
||||
}
|
||||
if req == nil {
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListByVersionSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return result, autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListByVersionResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByVersionComplete gets all elements from the list without paging.
|
||||
func (client ClusterVersionsClient) ListByVersionComplete(location string, clusterVersion string, cancel <-chan struct{}) (<-chan ClusterCodeVersionsResult, <-chan error) {
|
||||
resultChan := make(chan ClusterCodeVersionsResult)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByVersion(location, clusterVersion)
|
||||
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.ListByVersionNextResults(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
|
||||
}
|
||||
|
||||
+30
-54
@@ -14,9 +14,8 @@ package servicefabric
|
||||
// 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,22 +33,17 @@ const (
|
||||
BaselineUpgrade ClusterState = "BaselineUpgrade"
|
||||
// Deploying specifies the deploying state for cluster state.
|
||||
Deploying ClusterState = "Deploying"
|
||||
// EnforcingClusterVersion specifies the enforcing cluster version state
|
||||
// for cluster state.
|
||||
// EnforcingClusterVersion specifies the enforcing cluster version state for cluster state.
|
||||
EnforcingClusterVersion ClusterState = "EnforcingClusterVersion"
|
||||
// Ready specifies the ready state for cluster state.
|
||||
Ready ClusterState = "Ready"
|
||||
// UpdatingInfrastructure specifies the updating infrastructure state for
|
||||
// cluster state.
|
||||
// UpdatingInfrastructure specifies the updating infrastructure state for cluster state.
|
||||
UpdatingInfrastructure ClusterState = "UpdatingInfrastructure"
|
||||
// UpdatingUserCertificate specifies the updating user certificate state
|
||||
// for cluster state.
|
||||
// UpdatingUserCertificate specifies the updating user certificate state for cluster state.
|
||||
UpdatingUserCertificate ClusterState = "UpdatingUserCertificate"
|
||||
// UpdatingUserConfiguration specifies the updating user configuration
|
||||
// state for cluster state.
|
||||
// UpdatingUserConfiguration specifies the updating user configuration state for cluster state.
|
||||
UpdatingUserConfiguration ClusterState = "UpdatingUserConfiguration"
|
||||
// UpgradeServiceUnreachable specifies the upgrade service unreachable
|
||||
// state for cluster state.
|
||||
// UpgradeServiceUnreachable specifies the upgrade service unreachable state for cluster state.
|
||||
UpgradeServiceUnreachable ClusterState = "UpgradeServiceUnreachable"
|
||||
// WaitingForNodes specifies the waiting for nodes state for cluster state.
|
||||
WaitingForNodes ClusterState = "WaitingForNodes"
|
||||
@@ -95,14 +89,11 @@ const (
|
||||
type ReliabilityLevel string
|
||||
|
||||
const (
|
||||
// ReliabilityLevelBronze specifies the reliability level bronze state for
|
||||
// reliability level.
|
||||
// ReliabilityLevelBronze specifies the reliability level bronze state for reliability level.
|
||||
ReliabilityLevelBronze ReliabilityLevel = "Bronze"
|
||||
// ReliabilityLevelGold specifies the reliability level gold state for
|
||||
// reliability level.
|
||||
// ReliabilityLevelGold specifies the reliability level gold state for reliability level.
|
||||
ReliabilityLevelGold ReliabilityLevel = "Gold"
|
||||
// ReliabilityLevelSilver specifies the reliability level silver state for
|
||||
// reliability level.
|
||||
// ReliabilityLevelSilver specifies the reliability level silver state for reliability level.
|
||||
ReliabilityLevelSilver ReliabilityLevel = "Silver"
|
||||
)
|
||||
|
||||
@@ -110,17 +101,13 @@ const (
|
||||
type ReliabilityLevel1 string
|
||||
|
||||
const (
|
||||
// ReliabilityLevel1Bronze specifies the reliability level 1 bronze state
|
||||
// for reliability level 1.
|
||||
// ReliabilityLevel1Bronze specifies the reliability level 1 bronze state for reliability level 1.
|
||||
ReliabilityLevel1Bronze ReliabilityLevel1 = "Bronze"
|
||||
// ReliabilityLevel1Gold specifies the reliability level 1 gold state for
|
||||
// reliability level 1.
|
||||
// ReliabilityLevel1Gold specifies the reliability level 1 gold state for reliability level 1.
|
||||
ReliabilityLevel1Gold ReliabilityLevel1 = "Gold"
|
||||
// ReliabilityLevel1Platinum specifies the reliability level 1 platinum
|
||||
// state for reliability level 1.
|
||||
// ReliabilityLevel1Platinum specifies the reliability level 1 platinum state for reliability level 1.
|
||||
ReliabilityLevel1Platinum ReliabilityLevel1 = "Platinum"
|
||||
// ReliabilityLevel1Silver specifies the reliability level 1 silver state
|
||||
// for reliability level 1.
|
||||
// ReliabilityLevel1Silver specifies the reliability level 1 silver state for reliability level 1.
|
||||
ReliabilityLevel1Silver ReliabilityLevel1 = "Silver"
|
||||
)
|
||||
|
||||
@@ -138,11 +125,9 @@ const (
|
||||
type UpgradeMode1 string
|
||||
|
||||
const (
|
||||
// UpgradeMode1Automatic specifies the upgrade mode 1 automatic state for
|
||||
// upgrade mode 1.
|
||||
// UpgradeMode1Automatic specifies the upgrade mode 1 automatic state for upgrade mode 1.
|
||||
UpgradeMode1Automatic UpgradeMode1 = "Automatic"
|
||||
// UpgradeMode1Manual specifies the upgrade mode 1 manual state for upgrade
|
||||
// mode 1.
|
||||
// UpgradeMode1Manual specifies the upgrade mode 1 manual state for upgrade mode 1.
|
||||
UpgradeMode1Manual UpgradeMode1 = "Manual"
|
||||
)
|
||||
|
||||
@@ -154,8 +139,7 @@ const (
|
||||
AddressBook X509StoreName = "AddressBook"
|
||||
// AuthRoot specifies the auth root state for x509 store name.
|
||||
AuthRoot X509StoreName = "AuthRoot"
|
||||
// CertificateAuthority specifies the certificate authority state for x509
|
||||
// store name.
|
||||
// CertificateAuthority specifies the certificate authority state for x509 store name.
|
||||
CertificateAuthority X509StoreName = "CertificateAuthority"
|
||||
// Disallowed specifies the disallowed state for x509 store name.
|
||||
Disallowed X509StoreName = "Disallowed"
|
||||
@@ -165,13 +149,11 @@ const (
|
||||
Root X509StoreName = "Root"
|
||||
// TrustedPeople specifies the trusted people state for x509 store name.
|
||||
TrustedPeople X509StoreName = "TrustedPeople"
|
||||
// TrustedPublisher specifies the trusted publisher state for x509 store
|
||||
// name.
|
||||
// TrustedPublisher specifies the trusted publisher state for x509 store name.
|
||||
TrustedPublisher X509StoreName = "TrustedPublisher"
|
||||
)
|
||||
|
||||
// AvailableOperationDisplay is operation supported by ServiceFabric resource
|
||||
// provider
|
||||
// AvailableOperationDisplay is operation supported by ServiceFabric resource provider
|
||||
type AvailableOperationDisplay struct {
|
||||
Provider *string `json:"provider,omitempty"`
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
@@ -179,8 +161,7 @@ type AvailableOperationDisplay struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// AzureActiveDirectory is the settings to enable AAD authentication on the
|
||||
// cluster
|
||||
// AzureActiveDirectory is the settings to enable AAD authentication on the cluster
|
||||
type AzureActiveDirectory struct {
|
||||
TenantID *string `json:"tenantId,omitempty"`
|
||||
ClusterApplication *string `json:"clusterApplication,omitempty"`
|
||||
@@ -218,8 +199,7 @@ type Cluster struct {
|
||||
*ClusterProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ClusterCodeVersionsListResult is the list results of the ServiceFabric
|
||||
// runtime versions
|
||||
// ClusterCodeVersionsListResult is the list results of the ServiceFabric runtime versions
|
||||
type ClusterCodeVersionsListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]ClusterCodeVersionsResult `json:"value,omitempty"`
|
||||
@@ -238,17 +218,16 @@ func (client ClusterCodeVersionsListResult) ClusterCodeVersionsListResultPrepare
|
||||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// ClusterCodeVersionsResult is the result of the ServiceFabric runtime
|
||||
// versions
|
||||
// ClusterCodeVersionsResult is the result of the ServiceFabric runtime versions
|
||||
type ClusterCodeVersionsResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
*ClusterVersionDetails `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ClusterHealthPolicy is defines a health policy used to evaluate the health
|
||||
// of the cluster or of a cluster node.
|
||||
// ClusterHealthPolicy is defines a health policy used to evaluate the health of the cluster or of a cluster node.
|
||||
type ClusterHealthPolicy struct {
|
||||
MaxPercentUnhealthyNodes *int32 `json:"maxPercentUnhealthyNodes,omitempty"`
|
||||
MaxPercentUnhealthyApplications *int32 `json:"maxPercentUnhealthyApplications,omitempty"`
|
||||
@@ -296,8 +275,7 @@ type ClusterProperties struct {
|
||||
UpgradeDescription *ClusterUpgradePolicy `json:"upgradeDescription,omitempty"`
|
||||
}
|
||||
|
||||
// ClusterPropertiesUpdateParameters is the cluster resource properties can be
|
||||
// updated
|
||||
// ClusterPropertiesUpdateParameters is the cluster resource properties can be updated
|
||||
type ClusterPropertiesUpdateParameters struct {
|
||||
ReliabilityLevel ReliabilityLevel `json:"reliabilityLevel,omitempty"`
|
||||
UpgradeMode UpgradeMode `json:"upgradeMode,omitempty"`
|
||||
@@ -338,8 +316,7 @@ type ClusterUpgradePolicy struct {
|
||||
DeltaHealthPolicy *ClusterUpgradeDeltaHealthPolicy `json:"deltaHealthPolicy,omitempty"`
|
||||
}
|
||||
|
||||
// ClusterVersionDetails is the detail of the ServiceFabric runtime version
|
||||
// result
|
||||
// ClusterVersionDetails is the detail of the ServiceFabric runtime version result
|
||||
type ClusterVersionDetails struct {
|
||||
CodeVersion *string `json:"codeVersion,omitempty"`
|
||||
SupportExpiryUtc *string `json:"supportExpiryUtc,omitempty"`
|
||||
@@ -372,8 +349,8 @@ type ErrorModelError struct {
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// NodeTypeDescription is describes a node type in the cluster, each node type
|
||||
// represents sub set of nodes in the cluster
|
||||
// NodeTypeDescription is describes a node type in the cluster, each node type represents sub set of nodes in the
|
||||
// cluster
|
||||
type NodeTypeDescription struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
PlacementProperties *map[string]*string `json:"placementProperties,omitempty"`
|
||||
@@ -388,9 +365,8 @@ type NodeTypeDescription struct {
|
||||
ReverseProxyEndpointPort *int32 `json:"reverseProxyEndpointPort,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is result of the request to list ServiceFabric
|
||||
// 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 ServiceFabric 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 *[]OperationResult `json:"value,omitempty"`
|
||||
|
||||
+49
-7
@@ -14,9 +14,8 @@ package servicefabric
|
||||
// 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,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the client for the Operations methods of the
|
||||
// Servicefabric service.
|
||||
// OperationsClient is the client for the Operations methods of the Servicefabric service.
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,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)}
|
||||
}
|
||||
@@ -121,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 OperationResult, <-chan error) {
|
||||
resultChan := make(chan OperationResult)
|
||||
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
|
||||
}
|
||||
|
||||
+4
-5
@@ -14,16 +14,15 @@ package servicefabric
|
||||
// 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-servicefabric/2016-09-01"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-servicefabric/2016-09-01"
|
||||
}
|
||||
|
||||
// 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