You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/01/29 01:23:22 UTC
[GitHub] [cloudstack] GutoVeronezi opened a new pull request #5909: Quota custom tariffs
GutoVeronezi opened a new pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909
### Description
This PR solves issue #5891.
The main focus of this PR is to provide a flexible manner for operators to charge and bill their cloud resources. Issue #5891 has more details and flowcharts of all the mapped and affected/changed workflows.
The UI compatibility was not addressed in this PR. However, it's mapped to be the next steps.
The JS interpreter used to process the activation rules requires a GCC version higher or equal to 4.9. CentOS7, by default, is shipped with GCC 4.8; therefore, to build the packages we need to build a newer GCC version and install it. To make it easier, we already have an image with the GCC 9.3 published in the docker hub ([scclouds/cloudstack-rpm-builder:centos7-jdk11-gcc9-3](https://hub.docker.com/layers/189700957/scclouds/cloudstack-rpm-builder/centos7-jdk11-gcc9.3/images/sha256-efa266127cf28048d7942da9197d8962f2d0b076dacd8d1b9250433157bc9fb7?context=repo)).
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [x] Major
- [ ] Minor
### How Has This Been Tested?
I added unit tests to several methods, tested the whole CRUD, and the usage calculation.
To test the usage calculation I created some activation rules based on the cases described in issue #5891 (doing minor changes, such as changing the UUID to be validated). Then, I manually calculated the results and verified if the output is the same as I obtained in ACS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r795684571
##########
File path: api/src/main/java/org/apache/cloudstack/usage/UsageUnitTypes.java
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.usage;
+
+public enum UsageUnitTypes {
+ ComputeMonth ("Compute-Month"),
+ IpMonth ("IP-Month"),
+ Gb ("GB"),
+ GbMonth ("GB-Month"),
+ PolicyMonth ("Policy-Month");
Review comment:
I think we can "improve" by using more scientific notation. If they are per month it should read `/month` in my not so humble opinion. Not going to cry block this for this reason.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025212493
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2385
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti removed a comment on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
sureshanaparti removed a comment on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025199434
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r806045308
##########
File path: plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaTariffCreateCmd.java
##########
@@ -0,0 +1,152 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements. See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership. The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License. You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied. See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.api.command;
+
+import com.cloud.user.Account;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.api.response.QuotaTariffResponse;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+
+import java.util.Date;
+
+@APICommand(name = QuotaTariffCreateCmd.API_NAME, responseObject = QuotaTariffResponse.class, description = "Creates a quota tariff for a resource.", since = "4.17.0.0",
+requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
Review comment:
Makes sense, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r795861773
##########
File path: engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
##########
@@ -638,4 +638,53 @@ CREATE VIEW `cloud`.`domain_router_view` AS
left join
`cloud`.`async_job` ON async_job.instance_id = vm_instance.id
and async_job.instance_type = 'DomainRouter'
- and async_job.job_status = 0;
\ No newline at end of file
+ and async_job.job_status = 0;
+
+----- PR Quota custom tariffs #0000 -----
+-- Create column 'uuid'
+ALTER TABLE cloud_usage.quota_tariff
+ADD COLUMN `uuid` varchar(40);
+
+UPDATE cloud_usage.quota_tariff
+SET uuid = UUID()
Review comment:
@DaanHoogland, it generates an UUID to each record updated (quite similar, but different):
```sql
MariaDB [cloud_usage]> SELECT id, usage_name, uuid FROM cloud_usage.quota_tariff;
+----+------------------------+--------------------------------------+
| id | usage_name | uuid |
+----+------------------------+--------------------------------------+
| 1 | RUNNING_VM | 81c74b75-7ac5-11ec-9c0a-5254006051f5 |
| 2 | ALLOCATED_VM | 81c750e0-7ac5-11ec-9c0a-5254006051f5 |
| 3 | IP_ADDRESS | 81c75207-7ac5-11ec-9c0a-5254006051f5 |
| 4 | NETWORK_BYTES_SENT | 81c752e0-7ac5-11ec-9c0a-5254006051f5 |
| 5 | NETWORK_BYTES_RECEIVED | 81c753b2-7ac5-11ec-9c0a-5254006051f5 |
| 6 | VOLUME | 81c75467-7ac5-11ec-9c0a-5254006051f5 |
| 7 | TEMPLATE | 81c75516-7ac5-11ec-9c0a-5254006051f5 |
| 8 | ISO | 81c755dc-7ac5-11ec-9c0a-5254006051f5 |
| 9 | SNAPSHOT | 81c7568f-7ac5-11ec-9c0a-5254006051f5 |
| 10 | SECURITY_GROUP | 81c75748-7ac5-11ec-9c0a-5254006051f5 |
| 11 | LOAD_BALANCER_POLICY | 81c757f1-7ac5-11ec-9c0a-5254006051f5 |
| 12 | PORT_FORWARDING_RULE | 81c758a1-7ac5-11ec-9c0a-5254006051f5 |
| 13 | NETWORK_OFFERING | 81c7595e-7ac5-11ec-9c0a-5254006051f5 |
| 14 | VPN_USERS | 81c75a12-7ac5-11ec-9c0a-5254006051f5 |
| 15 | CPU_SPEED | 81c75acd-7ac5-11ec-9c0a-5254006051f5 |
| 16 | vCPU | 81c75b7a-7ac5-11ec-9c0a-5254006051f5 |
| 17 | MEMORY | 81c75e5d-7ac5-11ec-9c0a-5254006051f5 |
| 18 | VM_DISK_IO_READ | 81c75fbd-7ac5-11ec-9c0a-5254006051f5 |
| 19 | VM_DISK_IO_WRITE | 81c76090-7ac5-11ec-9c0a-5254006051f5 |
| 20 | VM_DISK_BYTES_READ | 81c7614b-7ac5-11ec-9c0a-5254006051f5 |
| 21 | VM_DISK_BYTES_WRITE | 81c76203-7ac5-11ec-9c0a-5254006051f5 |
| 22 | VM_SNAPSHOT | 81c762c2-7ac5-11ec-9c0a-5254006051f5 |
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1077899471
@rohityadavcloud, the idea behind the use of activation rules is to allow operators to decide when a tariff should be applied and customize the values according to their business requirements. JavaScript (JS) was the best option we found to create and process them, due to its simplicity (when compared with other languages, like Python, C, C++, and Java) and people's understanding of JSON.
The whole design of the feature was done considering that some users/operators could not use it; therefore, the activation rules are not mandatory and the previous behavior is kept. These changes are an enrichment of the quota plugin and have backward compatibility; users can decide to use it or not.
The idea came from some use cases that we have, indeed, however it was designed and developed to address generic needs. Furthermore, before proposing anything, we looked at OpenStack to see how it was handling rating/billing; we noticed that they use rules to decide when one tariff should be applied, and based on those ideas we extended the quota plugin in ACS to make it even more flexible and dynamic than OpenStack.
Regarding opening a thread on users@, the change is a new feature/improvement (allowing users to set activation rules to tariffs) and has backward compatibility. Therefore, I do not see the necessity in this case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r817576503
##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java
##########
@@ -18,10 +18,16 @@
import java.util.List;
+import org.apache.cloudstack.framework.config.ConfigKey;
+
import com.cloud.storage.Snapshot;
import com.cloud.utils.exception.CloudRuntimeException;
public interface SnapshotInfo extends DataObject, Snapshot {
+ ConfigKey<Boolean> BackupSnapshotAfterTakingSnapshot = new ConfigKey<Boolean>(Boolean.class, "snapshot.backup.to.secondary", "Snapshots", "true", "Indicates whether to always"
Review comment:
hm, reasonable explanation, it still doesn't feel good. I don't want to be dogmatic about it, but let's keep thinking about this. If we can't find a better way, soit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1047757410
Issue #5891 was updated addressing the changes regarding CPU_SPEED, CPU_NUMBER and MEMORY quota types.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r795567497
##########
File path: api/src/main/java/org/apache/cloudstack/usage/UsageUnitTypes.java
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.usage;
+
+public enum UsageUnitTypes {
+ ComputeMonth ("Compute-Month"),
+ IpMonth ("IP-Month"),
+ Gb ("GB"),
+ GbMonth ("GB-Month"),
+ PolicyMonth ("Policy-Month");
Review comment:
should these be per month? e.g. `IP/Month` (or `IP*Month`)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025199509
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1024864310
@GutoVeronezi a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] nvazquez commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058762970
Thanks @GutoVeronezi, just a comment for future reference: as explained in the PR description we can fix the packaging issue on CentOS7 only by upgrading GCC to version 9.3:
````
[ERROR] Tests run: 23, Failures: 0, Errors: 23, Skipped: 0, Time elapsed: 5.135 s <<< FAILURE! - in org.apache.cloudstack.utils.jsinterpreter.JsInterpreterTest
[ERROR] injectNullVariableTestInjectNullVariableResultTrue(org.apache.cloudstack.utils.jsinterpreter.JsInterpreterTest) Time elapsed: 0.001 s <<< ERROR!
com.cloud.utils.exception.CloudRuntimeException: Unable to instantiate JS interpreter [V8] due to [java.lang.IllegalStateException: J2V8 native library not loaded]
at org.apache.cloudstack.utils.jsinterpreter.JsInterpreterTest.<init>(JsInterpreterTest.java:53)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: J2V8 native library not loaded
at org.apache.cloudstack.utils.jsinterpreter.JsInterpreterTest.<init>(JsInterpreterTest.java:53)
Caused by: java.lang.IllegalStateException: J2V8 native library not loaded
Caused by: java.lang.UnsatisfiedLinkError:
Could not load J2V8 library. Reasons:
no libj2v8_linux_x86_64.so in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
no j2v8_linux_x86_64 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
/root/libj2v8_linux_x86_64.so: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /root/libj2v8_linux_x86_64.so)
````
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025428160
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi removed a comment on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi removed a comment on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1024864176
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r806045308
##########
File path: plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaTariffCreateCmd.java
##########
@@ -0,0 +1,152 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements. See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership. The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License. You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied. See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.api.command;
+
+import com.cloud.user.Account;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.api.response.QuotaTariffResponse;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+
+import java.util.Date;
+
+@APICommand(name = QuotaTariffCreateCmd.API_NAME, responseObject = QuotaTariffResponse.class, description = "Creates a quota tariff for a resource.", since = "4.17.0.0",
+requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
Review comment:
Makes sense, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] nvazquez commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058251960
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058431416
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r797907258
##########
File path: plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaTariffDeleteCmd.java
##########
@@ -0,0 +1,78 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements. See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership. The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License. You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied. See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.api.command;
+
+import com.cloud.user.Account;
+
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiArgValidator;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.api.response.QuotaTariffResponse;
+import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+
+@APICommand(name = QuotaTariffDeleteCmd.APINAME, description = "Marks a quota tariff as removed.", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false,
+responseHasSensitiveInfo = false, since = "4.17.0.0", authorized = {RoleType.Admin})
+public class QuotaTariffDeleteCmd extends BaseCmd {
+ public static final String APINAME = "quotaTariffDelete";
+ protected Logger logger = Logger.getLogger(getClass());
+ private String commandName = "quotatariffdeleteresponse";
Review comment:
command name pattern
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] RodrigoDLopez commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
RodrigoDLopez commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r797784677
##########
File path: plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaTariffCreateCmd.java
##########
@@ -0,0 +1,152 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements. See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership. The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License. You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied. See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.api.command;
+
+import com.cloud.user.Account;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.api.response.QuotaTariffResponse;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+
+import java.util.Date;
+
+@APICommand(name = "quotaTariffCreate", responseObject = QuotaTariffResponse.class, description = "Creates a quota tariff for a resource.", since = "4.17.0.0",
+requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
+public class QuotaTariffCreateCmd extends BaseCmd {
+ protected Logger logger = Logger.getLogger(getClass());
+ private String commandName = "quotatariffcreateresponse";
+
+ @Inject
+ QuotaResponseBuilder responseBuilder;
+
+ @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Quota tariff's name", length = 32)
+ private String name;
+
+ @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "Quota tariff's description.", length = 256)
+ private String description;
+
+ @Parameter(name = ApiConstants.USAGE_TYPE, type = CommandType.INTEGER, required = true, description = "Integer value for the usage type of the resource.")
+ private Integer usageType;
+
+ @Parameter(name = "value", type = CommandType.DOUBLE, required = true, description = "The quota tariff value of the resource as per the default unit.")
+ private Double value;
+
+ @Parameter(name = ApiConstants.ACTIVATION_RULE, type = CommandType.STRING, description = "Quota tariff's activation rule.",
+ length = 65535)
+ private String activationRule;
+
+ @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "The effective start date on/after which the quota tariff is effective. Use yyyy-MM-dd as"
+ + " the date format, e.g. startDate=2009-06-03. Inform null to use the current date.")
+ private Date startDate;
+
+ @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "The end date of the quota tariff. Use yyyy-MM-dd as the date format, e.g."
+ + " startDate=2009-06-03.")
Review comment:
simple typo fix "endDate=2009-06-03"
##########
File path: plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaTariffUpdateCmd.java
##########
@@ -41,20 +41,34 @@
@Inject
QuotaResponseBuilder _responseBuilder;
- @Parameter(name = ApiConstants.USAGE_TYPE, type = CommandType.INTEGER, required = true, description = "Integer value for the usage type of the resource")
+ @Parameter(name = ApiConstants.USAGE_TYPE, type = CommandType.INTEGER, description = "Integer value for the usage type of the resource")
private Integer usageType;
- @Parameter(name = "value", type = CommandType.DOUBLE, required = true, description = "The quota tariff value of the resource as per the default unit")
+ @Parameter(name = ApiConstants.VALUE, type = CommandType.DOUBLE, description = "The quota tariff value of the resource as per the default unit.")
private Double value;
- @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, required = true, description = "The effective start date on/after which the quota tariff is effective and older tariffs are no longer used for the usage type. Use yyyy-MM-dd as the date format, e.g. startDate=2009-06-03.")
+ @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "The effective start date on/after which the quota tariff is effective. Use yyyy-MM-dd as"
+ + " the date format, e.g. startDate=2009-06-03.")
private Date startDate;
- public int getUsageType() {
+ @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "The end date of the quota tariff. Use yyyy-MM-dd as the date format, e.g."
+ + " startDate=2009-06-03.")
Review comment:
same typo issue. endDate*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] weizhouapache commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r819346679
##########
File path: server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java
##########
@@ -223,7 +223,7 @@ public String getConfigComponentName() {
@Override
public ConfigKey<?>[] getConfigKeys() {
return new ConfigKey<?>[] {BackupRetryAttempts, BackupRetryInterval, SnapshotHourlyMax, SnapshotDailyMax, SnapshotMonthlyMax, SnapshotWeeklyMax, usageSnapshotSelection,
- BackupSnapshotAfterTakingSnapshot};
+ SnapshotInfo.BackupSnapshotAfterTakingSnapshot};
Review comment:
@DaanHoogland agree.
please do not move it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025199434
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi edited a comment on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi edited a comment on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025673850
> quite a bit @GutoVeronezi ;) is it ready for/do you want review?
@DaanHoogland, just a little =3.
There some details to adjust, like billing of CPU_CLOCK_RATE/CPU_NUMBER/MEMORY; however, reviews are welcome.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058222216
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2754
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r800719084
##########
File path: api/src/main/java/org/apache/cloudstack/usage/UsageUnitTypes.java
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.usage;
+
+public enum UsageUnitTypes {
+ ComputeMonth ("Compute-Month"),
+ IpMonth ("IP-Month"),
+ Gb ("GB"),
+ GbMonth ("GB-Month"),
+ PolicyMonth ("Policy-Month");
Review comment:
@DaanHoogland, done, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1031537875
Thanks @DaanHoogland & @RodrigoDLopez for the reviews!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025234248
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2389
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1024869752
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2374
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r797952364
##########
File path: utils/src/main/java/com/cloud/utils/UuidUtils.java
##########
@@ -29,7 +29,7 @@ public final static String first(String uuid) {
}
public static boolean validateUUID(String uuid) {
- RegularExpression regex = new RegularExpression("[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}");
+ RegularExpression regex = new RegularExpression("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
Review comment:
@DaanHoogland, fixed, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058459539
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2758
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058171415
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r797906544
##########
File path: plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaTariffCreateCmd.java
##########
@@ -0,0 +1,152 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements. See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership. The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License. You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied. See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.api.command;
+
+import com.cloud.user.Account;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.api.response.QuotaTariffResponse;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+
+import java.util.Date;
+
+@APICommand(name = "quotaTariffCreate", responseObject = QuotaTariffResponse.class, description = "Creates a quota tariff for a resource.", since = "4.17.0.0",
+requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
+public class QuotaTariffCreateCmd extends BaseCmd {
+ protected Logger logger = Logger.getLogger(getClass());
+ private String commandName = "quotatariffcreateresponse";
Review comment:
this is an old way to handle `commandName`, `getCommandName()` and `@APICommand.name`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r797910586
##########
File path: utils/src/main/java/com/cloud/utils/UuidUtils.java
##########
@@ -29,7 +29,7 @@ public final static String first(String uuid) {
}
public static boolean validateUUID(String uuid) {
- RegularExpression regex = new RegularExpression("[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}");
+ RegularExpression regex = new RegularExpression("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
Review comment:
why is capitals not allowed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti removed a comment on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
sureshanaparti removed a comment on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025418499
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025428047
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1076215167
Thanks for sharing @GutoVeronezi I'll get back in sometime after reviewing your spec as time allows. As the original co-author of the quota feature (https://cwiki.apache.org/confluence/display/CLOUDSTACK/Quota+Service+-+FS) I'm not sure if defining rules in JavaScript is a good idea but let me review the idea/spec; we've as with all other features a standard way for admin/users to work with CloudStack via APIs and configuration (offering or global settings). Most users/operators may not be JS developers/users. Considering this, you may (if not already) start a thread on users@ to build support on your idea (i.e. who's using this, is it general-purpose, or just specific users at scclouds?).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r817070714
##########
File path: framework/quota/src/test/java/org/apache/cloudstack/quota/constant/QuotaTypesTest.java
##########
@@ -43,6 +43,6 @@ public void testQuotaTypesList() {
@Test
public void testQuotaTypeDescription() {
assertNull(QuotaTypes.getDescription(-1));
- assertNotNull(QuotaTypes.getDescription(QuotaTypes.MEMORY));
+ assertNotNull(QuotaTypes.getDescription(QuotaTypes.VOLUME));
Review comment:
@DaanHoogland this type does not exist anymore. As described in the spec (#5891), in this proposal the tariffs will be custom, so instead of having one tariff type for each VM resource, the values will be injected as preset variables into the **RUNNING_VM** resource, allowing operators to charge them. The current **vCPU**, **CPU_SPEED** and **MEMORY** tariffs will be converted to **RUNNING_VM** tariffs with respective activation rules and their types will be removed from ACS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1026543004
@GutoVeronezi I got to go through only half yesterday, code looks good so far. I'll continue further down the line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r795758504
##########
File path: api/src/main/java/org/apache/cloudstack/usage/UsageUnitTypes.java
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.usage;
+
+public enum UsageUnitTypes {
+ ComputeMonth ("Compute-Month"),
+ IpMonth ("IP-Month"),
+ Gb ("GB"),
+ GbMonth ("GB-Month"),
+ PolicyMonth ("Policy-Month");
Review comment:
Reading further I think most of these are `*month` and not `/month`, as would make sense in billing (think of kWh).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r795747089
##########
File path: engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
##########
@@ -638,4 +638,53 @@ CREATE VIEW `cloud`.`domain_router_view` AS
left join
`cloud`.`async_job` ON async_job.instance_id = vm_instance.id
and async_job.instance_type = 'DomainRouter'
- and async_job.job_status = 0;
\ No newline at end of file
+ and async_job.job_status = 0;
+
+----- PR Quota custom tariffs #0000 -----
+-- Create column 'uuid'
+ALTER TABLE cloud_usage.quota_tariff
+ADD COLUMN `uuid` varchar(40);
+
+UPDATE cloud_usage.quota_tariff
+SET uuid = UUID()
Review comment:
not sure, but this might lead to multiple records with the same ID, i.e. uuid() would be evaluated before the update execution is done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025445529
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2395
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r795615612
##########
File path: api/src/main/java/org/apache/cloudstack/usage/UsageUnitTypes.java
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.usage;
+
+public enum UsageUnitTypes {
+ ComputeMonth ("Compute-Month"),
+ IpMonth ("IP-Month"),
+ Gb ("GB"),
+ GbMonth ("GB-Month"),
+ PolicyMonth ("Policy-Month");
Review comment:
@DaanHoogland, they follow the same logic as before, meaning the cost of 1 resource (1 compute, 1 IP, 1Gb) per month. Should we change the nomenclature?
Note: the usage unit types are the same, I only turned them into enums.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025673850
> quite a bit @GutoVeronezi ;) is it ready for/do you want review?
@DaanHoogland, just a little =3.
There some details to adjust, like billing of CPU_SPEED/CPU_CORE/MEMORY; however, reviews are welcome.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r816026617
##########
File path: framework/quota/src/test/java/org/apache/cloudstack/quota/constant/QuotaTypesTest.java
##########
@@ -43,6 +43,6 @@ public void testQuotaTypesList() {
@Test
public void testQuotaTypeDescription() {
assertNull(QuotaTypes.getDescription(-1));
- assertNotNull(QuotaTypes.getDescription(QuotaTypes.MEMORY));
+ assertNotNull(QuotaTypes.getDescription(QuotaTypes.VOLUME));
Review comment:
so `QuotaTypes.getDescription(QuotaTypes.MEMORY)` can now be `null`?
##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java
##########
@@ -18,10 +18,16 @@
import java.util.List;
+import org.apache.cloudstack.framework.config.ConfigKey;
+
import com.cloud.storage.Snapshot;
import com.cloud.utils.exception.CloudRuntimeException;
public interface SnapshotInfo extends DataObject, Snapshot {
+ ConfigKey<Boolean> BackupSnapshotAfterTakingSnapshot = new ConfigKey<Boolean>(Boolean.class, "snapshot.backup.to.secondary", "Snapshots", "true", "Indicates whether to always"
Review comment:
i think this should on a service - and not on a resource interface. I'd sugest `SnapshotManager`
##########
File path: server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java
##########
@@ -223,7 +223,7 @@ public String getConfigComponentName() {
@Override
public ConfigKey<?>[] getConfigKeys() {
return new ConfigKey<?>[] {BackupRetryAttempts, BackupRetryInterval, SnapshotHourlyMax, SnapshotDailyMax, SnapshotMonthlyMax, SnapshotWeeklyMax, usageSnapshotSelection,
- BackupSnapshotAfterTakingSnapshot};
+ SnapshotInfo.BackupSnapshotAfterTakingSnapshot};
Review comment:
this does not feel good. I think this config value must be in an interface that this service implements.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r817074237
##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java
##########
@@ -18,10 +18,16 @@
import java.util.List;
+import org.apache.cloudstack.framework.config.ConfigKey;
+
import com.cloud.storage.Snapshot;
import com.cloud.utils.exception.CloudRuntimeException;
public interface SnapshotInfo extends DataObject, Snapshot {
+ ConfigKey<Boolean> BackupSnapshotAfterTakingSnapshot = new ConfigKey<Boolean>(Boolean.class, "snapshot.backup.to.secondary", "Snapshots", "true", "Indicates whether to always"
Review comment:
@DaanHoogland, it was in `SnapshotManager`. I had to move to `SnapshotInfo` to be able to use in `PresetVariableHelper`, which will be used in the `usage` too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025418499
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025227840
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] SadiJr commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
SadiJr commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r804035947
##########
File path: plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaTariffCreateCmd.java
##########
@@ -0,0 +1,152 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements. See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership. The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License. You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied. See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.api.command;
+
+import com.cloud.user.Account;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.api.response.QuotaTariffResponse;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+
+import java.util.Date;
+
+@APICommand(name = QuotaTariffCreateCmd.API_NAME, responseObject = QuotaTariffResponse.class, description = "Creates a quota tariff for a resource.", since = "4.17.0.0",
+requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
Review comment:
It would be interesting to add authorization `authorized = {RoleType.Admin}` in this API. What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] NuxRo commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
NuxRo commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058912900
@GutoVeronezi @nvazquez
Operationally if one must depart from the stock gcc packages which should only be done as a last resort, at least do it the RedHat way and look at employing the devtoolset-7 (or greater) from the CentOS Software Collections.
This way everybody gets a proper environment.
/IMHO
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1074918704
Hi @GutoVeronezi this sounds like a bigger undertaking, I'm still trying to understand why we need a JS interpreter? Pardon me but I don't remember that being used in the original quota feature so that's why asking.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1075236171
Hi @rohityadavcloud, as explained in the spec (issue #5891 - [here](https://github.com/apache/cloudstack/issues/5891#proposed-changes--proposed-workflows) and [here](https://github.com/apache/cloudstack/issues/5891#proposed-changes--rules-processing-and-variables)), we're introducing a way to allow operators to define (or not) activation rules for the tariffs. These rules will be written in JS code; therefore, we'll need a JS interpreter to interpret them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1024864176
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r817070714
##########
File path: framework/quota/src/test/java/org/apache/cloudstack/quota/constant/QuotaTypesTest.java
##########
@@ -43,6 +43,6 @@ public void testQuotaTypesList() {
@Test
public void testQuotaTypeDescription() {
assertNull(QuotaTypes.getDescription(-1));
- assertNotNull(QuotaTypes.getDescription(QuotaTypes.MEMORY));
+ assertNotNull(QuotaTypes.getDescription(QuotaTypes.VOLUME));
Review comment:
@DaanHoogland this type does not exist anymore. As described in the spec (#5891), in this proposal the tariffs will be custom, so instead of having one tariff type for each VM resource, the values will be injected as preset variables into the RUNNING_VM resource, allowing operators to charge them. The current vCPU, CPU_SPEED and MEMORY tariffs will be converted to RUNNING_VM tariffs with respective activation rules and their types will be removed from ACS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] nvazquez commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058430496
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] nvazquez commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058769763
@GutoVeronezi have tried adding the specific gcc needed version on the `packaging/<DIST>/cloud.spec` files (or at least for centos7)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] nvazquez commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1058170849
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud edited a comment on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
rohityadavcloud edited a comment on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1076215167
Thanks for sharing @GutoVeronezi I'll get back in sometime after reviewing your spec as time allows. As the original co-author of the quota feature (https://cwiki.apache.org/confluence/display/CLOUDSTACK/Quota+Service+-+FS) I'm not sure if defining rules in JavaScript is a good idea but let me review the idea/spec; we've as with all other features a standard way for admin/users to work with CloudStack via APIs and configuration (offering or global settings). Most users/operators may not be JS developers/users. Considering this, you may (if not already) start a thread on users@ to build support on your idea (i.e. who may want to use this, esp the rule definition in JS - is it general-purpose, or just specific users at scclouds?).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#discussion_r795747089
##########
File path: engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
##########
@@ -638,4 +638,53 @@ CREATE VIEW `cloud`.`domain_router_view` AS
left join
`cloud`.`async_job` ON async_job.instance_id = vm_instance.id
and async_job.instance_type = 'DomainRouter'
- and async_job.job_status = 0;
\ No newline at end of file
+ and async_job.job_status = 0;
+
+----- PR Quota custom tariffs #0000 -----
+-- Create column 'uuid'
+ALTER TABLE cloud_usage.quota_tariff
+ADD COLUMN `uuid` varchar(40);
+
+UPDATE cloud_usage.quota_tariff
+SET uuid = UUID()
Review comment:
not sure, but this might lead to multiple records with the same ID, i.e. uuid() would be evaluated before the update execution is done. (cc @nvazquez ??)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025227651
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan removed a comment on pull request #5909: Quota custom tariffs
Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on pull request #5909:
URL: https://github.com/apache/cloudstack/pull/5909#issuecomment-1025199509
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org