Skip to content

Commit

Permalink
adding isDisabled() back to groovy classes
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-agrawal committed Jun 13, 2024
1 parent b18619f commit af33d39
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ class AppengineServerGroup implements ServerGroup, Serializable {
null
}

@Override
Boolean isDisabled() {
disabled
}

enum ServingStatus {
SERVING,
STOPPED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,9 @@ class SimpleServerGroup implements ServerGroup {
ServerGroup.Capacity capacity
ServerGroup.ImageSummary imageSummary
ServerGroup.ImagesSummary imagesSummary

@Override
Boolean isDisabled() {
return disabled
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ class DiscoverySupportUnitSpec extends Specification {
Map<String, Object> launchConfig
ServerGroup.InstanceCounts instanceCounts
ServerGroup.Capacity capacity
Boolean isDisabled() {disabled}
ServerGroup.ImageSummary getImageSummary() {}
ServerGroup.ImagesSummary getImagesSummary() {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class AzureServerGroupDescription extends AzureResourceOpsDescription implements
String securityGroupName
String subnetId /*Azure resource ID*/
List<String> storageAccountNames
Boolean disabled = false
Boolean isDisabled = false
List<AzureInboundPortConfig> inboundPortConfigs = []
String vnet
String subnet
Expand Down Expand Up @@ -140,6 +140,11 @@ class AzureServerGroupDescription extends AzureResourceOpsDescription implements
return this.securityGroupName == null ? new HashSet<String>() : Sets.newHashSet(this.securityGroupName)
}

@Override
Boolean isDisabled() {
this.isDisabled
}

@Override
ServerGroup.InstanceCounts getInstanceCounts() {
Collection<AzureInstance> instances = getInstances()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ class SimpleServerGroup implements ServerGroup {
Capacity capacity
ImagesSummary imagesSummary
ImageSummary imageSummary

@Override
Boolean isDisabled() {
return disabled
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ class GoogleServerGroup implements GoogleLabeledResource {
.deriveMoniker(GoogleServerGroup.this)
}

@Override
Boolean isDisabled() { // Because groovy isn't smart enough to generate this method :-(
disabled
}

@Override
Long getCreatedTime() {
launchConfig ? launchConfig.createdTime as Long : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ class OracleServerGroup {
ServerGroup.Capacity capacity = new ServerGroup.Capacity(desired: OracleServerGroup.this.targetSize,
min: OracleServerGroup.this.targetSize, max: OracleServerGroup.this.targetSize)

@Override
Boolean isDisabled() { // Because groovy isn't smart enough to generate this method :-(
disabled
}

@Override
Long getCreatedTime() {
launchConfig ? launchConfig.createdTime as Long : null
Expand Down

0 comments on commit af33d39

Please sign in to comment.