-
Notifications
You must be signed in to change notification settings - Fork 102
Adding support for VMLimit in AzureVMTemplateBuilder #652
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
base: master
Are you sure you want to change the base?
Conversation
629a9fa
to
9ffd059
Compare
9a94207
to
d50a471
Compare
@@ -96,7 +98,7 @@ public AzureVMAgentTemplate build() { | |||
fluent.getDescription(), | |||
fluent.getLabels(), | |||
fluent.getLocation(), | |||
null, | |||
new NoAvailabilityRequired(), |
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.
why this change here?
|
||
public class AzureVMTemplateBuilder extends AzureVMTemplateFluent<AzureVMTemplateBuilder> { | ||
|
||
private AzureVMTemplateFluent<?> fluent; | ||
|
||
public AzureVMTemplateBuilder() { | ||
this.fluent = this; | ||
fluent.withMaxVirtualMachinesLimit("10"); |
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.
this isn't right it shouldn't be here
|
||
public class AzureVMTemplateBuilder extends AzureVMTemplateFluent<AzureVMTemplateBuilder> { | ||
|
||
private AzureVMTemplateFluent<?> fluent; | ||
|
||
public AzureVMTemplateBuilder() { | ||
this.fluent = this; | ||
fluent.withMaxVirtualMachinesLimit("10"); | ||
} | ||
|
||
public AzureVMTemplateBuilder(AzureVMAgentTemplate template) { |
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.
you also need to call setMaxVirtualMachinesLimit
in the build
method further down
@@ -57,6 +59,7 @@ public class AzureVMTemplateFluent<T extends AzureVMTemplateFluent<T>> { | |||
private List<AzureTagPair> cloudTags; | |||
|
|||
public AzureVMTemplateFluent() { | |||
maxVirtualMachinesLimit = "10"; |
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.
maxVirtualMachinesLimit = "10"; | |
maxVirtualMachinesLimit = 10; |
@@ -12,6 +12,8 @@ | |||
|
|||
public class AzureVMTemplateFluent<T extends AzureVMTemplateFluent<T>> { | |||
|
|||
private String maxVirtualMachinesLimit; |
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.
private String maxVirtualMachinesLimit; | |
private int maxVirtualMachinesLimit; |
@@ -73,6 +76,11 @@ public AzureVMTemplateFluent() { | |||
} | |||
|
|||
//CHECKSTYLE:OFF | |||
public T withMaxVirtualMachinesLimit(String maxVirtualMachinesLimit) { |
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.
public T withMaxVirtualMachinesLimit(String maxVirtualMachinesLimit) { | |
public T withMaxVirtualMachinesLimit(int maxVirtualMachinesLimit) { |
@@ -208,6 +216,10 @@ public T withAdminCredential(String credentialsId) { | |||
} | |||
//CHECKSTYLE:ON | |||
|
|||
public String getMaxVirtualMachinesLimit() { |
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.
public String getMaxVirtualMachinesLimit() { | |
public int getMaxVirtualMachinesLimit() { |
Testing done
Submitter checklist