-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd9550f
commit fc9dd57
Showing
8 changed files
with
316 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
source/Octopus.Server.Client/Editors/Async/AzureOidcAccountEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using Octopus.Client.Model.Accounts; | ||
using Octopus.Client.Repositories.Async; | ||
|
||
namespace Octopus.Client.Editors.Async | ||
{ | ||
public class AzureOidcAccountEditor : AccountEditor<AzureSubscriptionAccountResource, AzureOidcAccountEditor> | ||
{ | ||
public AzureOidcAccountEditor(IAccountRepository repository) : base(repository) | ||
{ | ||
} | ||
|
||
public Task<List<AzureOidcAccountResource.ResourceGroup>> ResourceGroups() | ||
{ | ||
return Repository.Client.Get<List<AzureOidcAccountResource.ResourceGroup>>(Instance.Link("ResourceGroups")); | ||
} | ||
|
||
public Task<List<AzureOidcAccountResource.WebSite>> WebSites() | ||
{ | ||
return Repository.Client.Get<List<AzureOidcAccountResource.WebSite>>(Instance.Link("WebSites")); | ||
} | ||
|
||
public Task<List<AzureOidcAccountResource.WebSlot>> WebSlots(AzureOidcAccountResource.WebSite site) | ||
{ | ||
return Repository.Client.Get<List<AzureOidcAccountResource.WebSlot>>(Instance.Link("WebSlots"), | ||
new {id = Instance.Id, resourceGroupName = site.ResourceGroup, webSiteName = site.WebSpace}); | ||
} | ||
|
||
public Task<List<AzureStorageAccount>> StorageAccounts() | ||
{ | ||
return Repository.Client.Get<List<AzureStorageAccount>>(Instance.Link("StorageAccounts")); | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
source/Octopus.Server.Client/Editors/AzureOidcAccountEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System.Collections.Generic; | ||
using Octopus.Client.Model.Accounts; | ||
using Octopus.Client.Repositories; | ||
|
||
namespace Octopus.Client.Editors | ||
{ | ||
public class AzureOidcAccountEditor : AccountEditor<AzureOidcAccountResource, AzureOidcAccountEditor> | ||
{ | ||
public AzureOidcAccountEditor(IAccountRepository repository) : base(repository) | ||
{ | ||
} | ||
|
||
public List<AzureOidcAccountResource.ResourceGroup> ResourceGroups() | ||
{ | ||
return Repository.Client.Get<List<AzureOidcAccountResource.ResourceGroup>>(Instance.Link("ResourceGroups")); | ||
} | ||
|
||
public List<AzureOidcAccountResource.WebSite> WebSites() | ||
{ | ||
return Repository.Client.Get<List<AzureOidcAccountResource.WebSite>>(Instance.Link("WebSites")); | ||
} | ||
|
||
public List<AzureOidcAccountResource.WebSlot> WebSiteSlots(AzureOidcAccountResource.WebSite site) | ||
{ | ||
return Repository.Client.Get<List<AzureOidcAccountResource.WebSlot>>(Instance.Link("WebSiteSlots"), | ||
new {resourceGroupName = site.ResourceGroup, webSiteName = site.Name}); | ||
} | ||
|
||
public List<AzureStorageAccount> StorageAccounts() | ||
{ | ||
return Repository.Client.Get<List<AzureStorageAccount>>(Instance.Link("StorageAccounts")); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,6 @@ public enum AccountType | |
AmazonWebServicesRoleAccount, | ||
Token, | ||
GoogleCloudAccount, | ||
AzureOidc, | ||
} | ||
} |
Oops, something went wrong.