Skip to content

RS Backup PS Swagger Migration #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 67 commits into
base: novRelease
Choose a base branch
from
Open

RS Backup PS Swagger Migration #357

wants to merge 67 commits into from

Conversation

dragonfly91
Copy link

No description provided.

@@ -60,8 +60,8 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Copy link

@pragrawa pragrawa Nov 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False [](start = 6, length = 40)

Remove changes in this file #Closed

@pragrawa
Copy link

pragrawa commented Nov 11, 2016

using System.Net.Security;

Keep System usings first #Closed


Refers to: src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesClient.cs:23 in 302e2ba. [](commit_id = 302e2bafce0b2335f6bd232d2950f3c4d628bf56, deletion_comment = False)

using System.Runtime.Serialization;
using System.Xml;
using Hyak.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Commands.ResourceManager.Common;
using Newtonsoft.Json;
using System.Text;
Copy link

@pragrawa pragrawa Nov 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Text; [](start = 6, length = 12)

System usings first #Closed

@pragrawa
Copy link

using System.Net.Security;

See in other files also


In reply to: 259896841 [](ancestors = 259896841)


Refers to: src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesClient.cs:23 in 302e2ba. [](commit_id = 302e2bafce0b2335f6bd232d2950f3c4d628bf56, deletion_comment = False)

@@ -47,9 +47,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.RecoveryServices.Backup, Version=0.9.0.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Microsoft.Azure.Management.RecoveryServices.Backup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Copy link

@pragrawa pragrawa Nov 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

31bf3856ad364e35 [](start = 125, length = 16)

What is Public Token key here, will it be same for all project reference ? #WontFix

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added automatically by VS. I'm not sure what this is about.


In reply to: 87546813 [](ancestors = 87546813)

base.SetupHttpClientPipeline();
AzureSession.ClientFactory.AddHandler(new RpNamespaceHandler(ServiceClientAdapter.ResourceProviderNamespace));
AzureSession.ClientFactory.AddHandler(new ClientRequestIdHandler());
//AzureSession.ClientFactory.AddHandler(new CultureHandler());
Copy link

@pragrawa pragrawa Nov 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//AzureSession.ClientFactory.AddHandler(new CultureHandler()); [](start = 12, length = 62)

Remove commented code #Closed

@@ -61,6 +59,14 @@ protected void InitializeAzureBackupCmdlet()
Logger.Instance = new Logger(WriteWarning, WriteDebug, WriteVerbose, ThrowTerminatingError);
}

protected override void SetupHttpClientPipeline()
Copy link

@pragrawa pragrawa Nov 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected override void SetupHttpClientPipeline() [](start = 8, length = 49)

Add also small summary for this function
#Closed

var cloudEx = exception as CloudException;
if (cloudEx.Response != null && cloudEx.Response.StatusCode == HttpStatusCode.NotFound)
var cloudEx = exception as AzureRestNS.CloudException;
if (cloudEx.Response != null && cloudEx.Response.StatusCode == System.Net.HttpStatusCode.NotFound)
Copy link

@pragrawa pragrawa Nov 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Net.HttpStatusCode.NotFo [](start = 83, length = 31)

Use some alias instead of full namespace #Closed

@@ -171,42 +177,42 @@ public List<CmdletModel.JobBase> GetJobObject(IList<string> jobIds)
/// <summary>
/// Based on the response from the service, handles the job created in the service appropriately.
/// </summary>
/// <param name="itemResponse">Response from service</param>
/// <param name="jobResponse">Response from service</param>
Copy link

@pragrawa pragrawa Nov 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jobResponse [](start = 25, length = 11)

param name is response #Closed

@@ -66,10 +63,15 @@ public override void ExecuteCmdlet()

var cancelResponse = ServiceClientAdapter.CancelJob(JobId);

if (cancelResponse.StatusCode != HttpStatusCode.NoContent)
// Add tracking part
Copy link

@pragrawa pragrawa Nov 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Add tracking part [](start = 16, length = 20)

Write comments in more detail #Resolved

markcowl and others added 11 commits November 21, 2016 01:39
Adding retirement message for managed cache customers who will perform powershell commands on managed cache post retirement date
Search code base for any deprecation warning and remove it
Merge "Adding storage account properties to SQL threat detection cmdlets"
Adding storage account properties to SQL threat detection cmdlets
Azure powershell SDK changes for Notification Hubs. Added a skuTier parameter for create/update namespace.
vaishali33 and others added 15 commits November 29, 2016 16:20
…Database, Server and Elastic Pool (Azure#3206)

* Fixed Azure Sql Tags for Database, server and elastic pools.

* Fixed Azure Sql Tags for Database, server and elastic pools on both GET and SET.
Fixed SET server command.

* Added tests and addressed comments from code review.

* Added tests and addressed comments from code review.
* refactoring task modules

* missed Refactoring modules

* Making modular modules for various tasks

* Added cmdlet to create Service Principal. Refactored Repo-Tasks to include multiple modular modules (e.g. Build-Tasks, TestFx-Tasks)

* Removing SPN cmdlets
* enabling disabled tests

* updating test category as CheckinTests. Fixed the cmdlet directory path to be included while running static analysis on test cmdlet assembly
* Added -JsonAttributes option to set custom json attributes in first-boot.json

Signed-off-by: Vasu1105 <[email protected]>

* Fixed multiple condition for SetAzureVMChefExtension command in Resource Management, Updated -JsonAttribute description with example, Added new -ChefServiceInterval option

Signed-off-by: Vasu1105 <[email protected]>

* Refactored code for Chef extension Set-AzureVMChefExtension Service management command to reduce multiple conditions

Signed-off-by: Vasu1105 <[email protected]>

* Fixed review comments

Signed-off-by: Vasu1105 <[email protected]>

* Added automated test for Set-AzureVMChefExtension

Signed-off-by: Vasu1105 <[email protected]>

* Regenerated record for automated test

Signed-off-by: Vasu1105 <[email protected]>

* Added code to get current directory

Signed-off-by: Vasu1105 <[email protected]>

* Added global exception for crdential files

Signed-off-by: Vasu1105 <[email protected]>

* Updated changelog.md

Signed-off-by: Vasu1105 <[email protected]>
Update libraries for Adal 2.28.3
- If ApiId is not provided, generate it.
Change deployment polling polling logic.
Migrating cmdlet code base to swagger.

Swagger changes for job conversion, job adapter, policy adapter

Swagger Changes

Swagger changes.

SwaggerChanges in Provider sln

Swagger changes

swagger changes

swagger changes. Added latest swaggerDlls

Migrated PO calls to swagger

Swagger changes for Policy and Job model

Infra part 1

Removed custom request headers, as client request ID will be passed via the Delegating Handler

Swagger changes Part2 for Jobs and Policy

Mkherani swagger (#354)

* Container: ServiceCLient and conversionHelper

* Container: conversionHelper.cs

* container changes completed.

Updating swagger dll

Migrating common job tracking to Swagger.

Swagger: fixed build

Swagger changes

Swagger changes for Policy/Jobs

Tracking Helper Status code change

RecoveryServicesBackupClient init hack in test

Adding Microsoft.Rest.ClientRuntime.Azure to packages config

Adding Microsoft.Rest.ClientRuntime.Azure to package config files of ServiceClientAdapter and Test

Auth changes due to autorest in service client adapter, base cmdlet and base test.

Correcting the reference for Microsoft.Rest.ClientRuntime.dll

Changed auth dll reference

Fixed internal constructors in the client

Fixing build issue

Updated latest DLL and made fixes

Added Microsoft.Rest.ClientRuntime.Azure ref to Models proj.

Fixing build break

Fixing issue in job

ListRP fix

DateTime changes

Updated to latest AutoRest DLL

Updated latest AutoRest DLL fixed datetime format

DateTime fix

Exception handling changes

Updated latest AutoRest DLL

Added QueryBuilder util

Added ToCamelCase string extension

Fixing issues with query filters.

Fixing filter for GetRPList

Enum and query builder fixes

Updated AutoRest DLL. fixed container bug with polymorphism

Fix for pagination in HelperUtil.cs

Fix for operation status tracking using location header

Fixing issues with datetime, policy and query filters.

Fixing query filter issue except datetime filter

Fix for policy filter

Updated latest Swagger DLL - used UTC converter for serialization, removed ContainerType enum and made corresponding changes.

wix file changes and set-policy cmdlet fix

Get policy filter fix

Get Policy fix for default backup management type

Fixed test infra and ready for recording.
Added time Filter negative test and session record for GetRP and GetJobTimeFilter

Job Wait and Cancel records

Merged GetRP and restore test to save run time.
Added session record for GetRP and backup item test case.

Added AzureVM Workload trait to tests

Removing restore cmdlet call from getRP.

Fixing MSI build break.

Updated Client Request ID to include "-PS"

Added "-PS" to client request ID

Fixed namespaces

Fixed container API bug and recorded MAB test cases

Undoing changes to authentication csproj file

Undoing changes to Commands Common csproj

undoing changes to commands common csproj

undoing changes to cognitive services sln

undoing changes

Undoing unwanted changes

1. Undoing unwated changes to csproj files and 2. Kept system using first

Fixing build

recording for Azure Sql PaaS workload cmdlets.

Addressed CR comments

Addressed CR comments

Taken code guideline - every line should be 100 chars of less.

Recorded DPM tests and added session records

Fixing mistakes in comments

Using aliases for namespaces wherever possible.

namespace alias changes
Formatting changes

Removed extra empty lines

sorted and pruned usings
Moving to nuget dependencies

Removing unwanted changes from test case
Undone edits to common changelog and updated project specific changelog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.