/// <summary> /// Initializes a new instance of the AzureStackClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public AzureStackClient(HttpClient httpClient) : base(httpClient) { this._clouds = new CloudOperations(this); this._curation = new CurationOperations(this); this._delegatedOffers = new DelegatedOfferOperations(this); this._delegatedProviderConfiguration = new DelegatedProviderConfigurationOperations(this); this._eventTypes = new EventTypesOperations(this); this._extensionsMetadata = new ExtensionMetadataOperations(this); this._galleryItem = new GalleryItemOperations(this); this._importedSubscriptions = new ImportedSubscriptionOperations(this); this._managedLocations = new ManagedLocationOperations(this); this._managedOffers = new ManagedOfferOperations(this); this._managedPlans = new ManagedPlanOperations(this); this._managedSubscriptions = new ManagedSubscriptionOperations(this); this._offers = new OfferOperations(this); this._package = new PackageOperations(this); this._plans = new PlanOperations(this); this._providerRegistrations = new ProviderRegistrationOperations(this); this._publicGalleryItem = new PublicGalleryItemOperations(this); this._resourceGroups = new ResourceGroupOperations(this); this._resources = new ResourceOperations(this); this._resourceProviders = new ResourceProviderOperations(this); this._shallowResources = new ShallowResourceOperations(this); this._subscriptions = new SubscriptionOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Gets the public offers under the zero day (root) provider /// </summary> /// <param name='operations'> /// Reference to the Microsoft.AzureStack.Management.IOfferOperations. /// </param> /// <returns> /// Result of the offer /// </returns> public static OfferListResult ListUnderRootProvider(this IOfferOperations operations) { return(Task.Factory.StartNew((object s) => { return ((IOfferOperations)s).ListUnderRootProviderAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Lists the offer with the next link /// </summary> /// <param name='operations'> /// Reference to the Microsoft.AzureStack.Management.IOfferOperations. /// </param> /// <param name='nextLink'> /// Required. The URL to get the next set of offers /// </param> /// <returns> /// Result of the offer /// </returns> public static OfferListResult ListNext(this IOfferOperations operations, string nextLink) { return(Task.Factory.StartNew((object s) => { return ((IOfferOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets the price of the offer. /// </summary> /// <param name='operations'> /// Reference to the Microsoft.AzureStack.Management.IOfferOperations. /// </param> /// <param name='offerId'> /// Required. the full offer ID /// /delegatedProviders/{providerId}/offers/{offerId}. /// </param> /// <returns> /// Offer price result. /// </returns> public static OfferGetPriceResult GetPrice(this IOfferOperations operations, string offerId) { return(Task.Factory.StartNew((object s) => { return ((IOfferOperations)s).GetPriceAsync(offerId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public override void Execute(IOfferOperations dsl, ConDepSettings settings) { dsl.Local.HttpGet("http://www.con-dep.net"); dsl.Remote(server => { server .Configure.IIS(); server .Execute.PowerShell("ipconfig"); }); dsl.Local.HttpGet("http://blog.torresdal.net"); }
/// <summary> /// Initializes a new instance of the AzureStackClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public AzureStackClient(HttpClient httpClient) : base(httpClient) { this._curation = new CurationOperations(this); this._extensionsMetadata = new ExtensionMetadataOperations(this); this._galleryItem = new GalleryItemOperations(this); this._managedLocations = new ManagedLocationOperations(this); this._managedOffers = new ManagedOfferOperations(this); this._managedPlans = new ManagedPlanOperations(this); this._managedSubscriptions = new ManagedSubscriptionOperations(this); this._offers = new OfferOperations(this); this._plans = new PlanOperations(this); this._providerRegistrations = new ProviderRegistrationOperations(this); this._publicGalleryItem = new PublicGalleryItemOperations(this); this._resourceGroups = new ResourceGroupOperations(this); this._subscriptions = new SubscriptionOperations(this); this._usageConnections = new UsageConnectionsOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Gets an offer given its Id. /// </summary> /// <param name='operations'> /// Reference to the Microsoft.AzureStack.Management.IOfferOperations. /// </param> /// <param name='offerId'> /// Required. The full offer Id in format /// /delegatedProviders/{providerId}/offers/{offerName} /// </param> /// <returns> /// The offer get result. /// </returns> public static Task <OfferGetResult> GetAsync(this IOfferOperations operations, string offerId) { return(operations.GetAsync(offerId, CancellationToken.None)); }
/// <summary> /// Gets the public offers under the zero day (root) provider /// </summary> /// <param name='operations'> /// Reference to the Microsoft.AzureStack.Management.IOfferOperations. /// </param> /// <returns> /// Result of the offer /// </returns> public static Task <OfferListResult> ListUnderRootProviderAsync(this IOfferOperations operations) { return(operations.ListUnderRootProviderAsync(CancellationToken.None)); }
/// <summary> /// Lists the offer with the next link /// </summary> /// <param name='operations'> /// Reference to the Microsoft.AzureStack.Management.IOfferOperations. /// </param> /// <param name='nextLink'> /// Required. The URL to get the next set of offers /// </param> /// <returns> /// Result of the offer /// </returns> public static Task <OfferListResult> ListNextAsync(this IOfferOperations operations, string nextLink) { return(operations.ListNextAsync(nextLink, CancellationToken.None)); }
/// <summary> /// Gets the public offers under the provider which has the given /// provider identifier /// </summary> /// <param name='operations'> /// Reference to the Microsoft.AzureStack.Management.IOfferOperations. /// </param> /// <param name='providerIdentifier'> /// Required. The provider identifier, we get the public offers under /// that provider. /// </param> /// <returns> /// Result of the offer /// </returns> public static Task <OfferListResult> ListAsync(this IOfferOperations operations, string providerIdentifier) { return(operations.ListAsync(providerIdentifier, CancellationToken.None)); }
public override void Execute(IOfferOperations dsl, ConDepSettings settings) { //OnlyIf is removed from the newwst ConDep.Dsl throw new System.NotImplementedException(); }
/// <summary> /// Will execute a Runbook of given type T. Use this if you want to execute a Runbook from another Runbook. /// </summary> /// <typeparam name="T">Runbook type</typeparam> /// <param name="dsl">The ConDep DSL</param> /// <param name="settings">The ConDep settings</param> public static void Execute <T>(IOfferOperations dsl, ConDepSettings settings) where T : Runbook, new() { var runbook = new T(); runbook.Execute(dsl, settings); }
public override void Execute(IOfferOperations dsl, ConDepSettings settings) { }
public override void Execute(IOfferOperations dsl, ConDepSettings settings) { const string location = "West Europe"; dsl.Local.Azure(azure => azure.ResourceGroup.CreateResourceGroup("resourcegroup-name", location)); }
public override void Execute(IOfferOperations dsl, ConDepSettings settings) { dsl.Remote(x => x.Execute.PowerShell("asdlfkj")); }
public abstract void Execute(IOfferOperations dsl, ConDepSettings settings);
public override void Execute(IOfferOperations dsl, ConDepSettings settings) { const string location = "West Europe"; dsl.Local.Azure(azure => azure.ResourceGroup.CreateResourceGroup("resourcegroup-name", location)); }
public override void Execute(IOfferOperations dsl, ConDepSettings settings) { }