-
Notifications
You must be signed in to change notification settings - Fork 863
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
Remove obsolete IPRange property from EC2 #3687
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"services": [ | ||
{ | ||
"serviceName": "EC2", | ||
"type": "patch", | ||
"changeLogMessages": [ | ||
"[Breaking Change] Remove obsolete IPRanges behavior from EC2. IPV4Ranges or IPV6Ranges should be used instead." | ||
] | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ public class AmazonEC2PreMarshallHandler : PipelineHandler | |
internal enum IpRangeValue | ||
{ | ||
Invalid, | ||
IpRanges, | ||
Ipv4Ranges | ||
} | ||
|
||
|
@@ -225,21 +224,7 @@ private static void SelectModifiedIpRange(List<IpPermission> IpPermissions) | |
|
||
foreach (var ipPermission in IpPermissions) | ||
{ | ||
switch (ipPermission.CanModify()) | ||
{ | ||
case IpRangeValue.Invalid: | ||
throw new ArgumentException("Cannot set values for both Ipv4Ranges and IpRanges properties on the IpPermission type which is part of the request. Consider using only Ipv4Ranges as IpRanges has been marked obsolete."); | ||
case IpRangeValue.IpRanges: | ||
#pragma warning disable CS0618 | ||
ipPermission.SelectIpRangeForMarshalling(ipPermission.IpRanges); | ||
#pragma warning restore CS0618 | ||
break; | ||
case IpRangeValue.Ipv4Ranges: | ||
ipPermission.SelectIpV4RangeForMarshalling(ipPermission.Ipv4Ranges); | ||
break; | ||
default: | ||
break; | ||
} | ||
ipPermission.SelectIpV4RangeForMarshalling(ipPermission.Ipv4Ranges); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like we should be able to refactor EC2 to not even need this method since we only have one property now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch, I removed a bunch of related code that that was accounting for the old |
||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't remove this whole enum since we only have one property now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point removed.