You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by e-do <no...@github.com> on 2013/08/09 02:17:08 UTC

[jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Added type, page, and pageSize to ListUsageRecordsOptions. These are optional parameters for listUsageRecords http://cloudstack.apache.org/docs/api/apidocs-4.1/root_admin/listUsageRecords.html


You can merge this Pull Request by running:

  git pull https://github.com/e-do/jclouds master

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds/pull/106

-- Commit Summary --

  * Added type, page, and pageSize to ListUsageRecordsOptions. These are optional parameters for listUsageRecords http://cloudstack.apache.org/docs/api/apidocs-4.1/root_admin/listUsageRecords.html

-- File Changes --

    M apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListUsageRecordsOptions.java (32)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/106.patch
https://github.com/jclouds/jclouds/pull/106.diff


Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by e-do <no...@github.com>.
I've been trying to figure out how to squash the changes into one commit. There seems to be multiple ways of doing it. I was wondering if you could point me in the right direction on which one is recommended.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22445712

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Bayer <no...@github.com>.
Oh, and I'll backport this to 1.6.x once the branch is open again.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22527625

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Bayer <no...@github.com>.
Great! One last thing - could you squash this down to one commit? Once you've done that, I'll commit it to the master branch, and once 1.6.2-incubating has released, I'll commit it to the 1.6.x branch as well.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22420613

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by e-do <no...@github.com>.
Let me know if there's anything else I can do. Thanks. This has been a great learning experience.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22417687

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #292](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/292/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22369624

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #594](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/594/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22497725

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #582](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/582/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22420385

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Phillips <no...@github.com>.
> @@ -345,7 +345,7 @@ protected UsageRecord(String id, @Nullable String description, @Nullable String
>                           @Nullable String releaseDate, @Nullable String zoneId, @Nullable String virtualMachineId, @Nullable String virtualMachineName,
>                           @Nullable String serviceOfferingId, @Nullable String templateId, @Nullable String ipAddress,
>                           boolean isSourceNAT, double rawUsageHours, @Nullable String usage, @Nullable String type, @Nullable UsageType usageType) {
> -      this.id = checkNotNull(id, "id");
> +      this.id = id;

I think you mean https://github.com/jclouds/jclouds/pull/124? This contains _two_ commits, is that the intention? Could you remove [this commit](https://github.com/e-do/jclouds/commit/ce72bdda940d9b5039c26af5a3a6de0f1b36a916) from the new PR, and also rename it to indicate what the purpose is, e.g. "Mark id as nullable"? Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106/files#r5967107

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Bayer <no...@github.com>.
git rebase's interactive mode should do the trick.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22446414

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #305](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/305/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22496771

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Bayer <no...@github.com>.
Closed #106.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #580](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/580/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22369862

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Bayer <no...@github.com>.
Could you update the expect tests as well?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22410114

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #581](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/581/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22370790

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by e-do <no...@github.com>.
> @@ -345,7 +345,7 @@ protected UsageRecord(String id, @Nullable String description, @Nullable String
>                           @Nullable String releaseDate, @Nullable String zoneId, @Nullable String virtualMachineId, @Nullable String virtualMachineName,
>                           @Nullable String serviceOfferingId, @Nullable String templateId, @Nullable String ipAddress,
>                           boolean isSourceNAT, double rawUsageHours, @Nullable String usage, @Nullable String type, @Nullable UsageType usageType) {
> -      this.id = checkNotNull(id, "id");
> +      this.id = id;

I created a new pull request. I added the <code>@Nullable</code> annotation to the parameters. In addition, I added it above the getter for <code>id</code>.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106/files#r5966628

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by e-do <no...@github.com>.
> @@ -345,7 +345,7 @@ protected UsageRecord(String id, @Nullable String description, @Nullable String
>                           @Nullable String releaseDate, @Nullable String zoneId, @Nullable String virtualMachineId, @Nullable String virtualMachineName,
>                           @Nullable String serviceOfferingId, @Nullable String templateId, @Nullable String ipAddress,
>                           boolean isSourceNAT, double rawUsageHours, @Nullable String usage, @Nullable String type, @Nullable UsageType usageType) {
> -      this.id = checkNotNull(id, "id");
> +      this.id = id;

The field <code>id</code> can be null. It seems like the method parameter needs the annotation <code>@Nullable</code>. It was missed. I will provide a fix. Sorry.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106/files#r5928962

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #136](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/136/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22497704

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #123](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/123/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22370935

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #293](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/293/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22371110

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #124](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/124/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22420697

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #294](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/294/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22420066

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Ignasi Barrera <no...@github.com>.
When you squash the commits into a single one, you are rewriting the commit history; you replacing 2 commits by a single one. Since those 2 commits already exist in the remote (GitHub), pushing your squashed changes means to rewrite the commit history in the remote, and Git prevents you from doing that. You will need to force the push by adding the `-f` parameter to the command, once you have double-checked that everything is properly squashed and rebased to the latest master version.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22476462

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by e-do <no...@github.com>.
Thank you. The repo has been updated (:

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22493951

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Phillips <no...@github.com>.
> @@ -345,7 +345,7 @@ protected UsageRecord(String id, @Nullable String description, @Nullable String
>                           @Nullable String releaseDate, @Nullable String zoneId, @Nullable String virtualMachineId, @Nullable String virtualMachineName,
>                           @Nullable String serviceOfferingId, @Nullable String templateId, @Nullable String ipAddress,
>                           boolean isSourceNAT, double rawUsageHours, @Nullable String usage, @Nullable String type, @Nullable UsageType usageType) {
> -      this.id = checkNotNull(id, "id");
> +      this.id = id;

> Sorry.

No problem! Clear now. Thanks for explaining!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106/files#r5929677

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Phillips <no...@github.com>.
> @@ -345,7 +345,7 @@ protected UsageRecord(String id, @Nullable String description, @Nullable String
>                           @Nullable String releaseDate, @Nullable String zoneId, @Nullable String virtualMachineId, @Nullable String virtualMachineName,
>                           @Nullable String serviceOfferingId, @Nullable String templateId, @Nullable String ipAddress,
>                           boolean isSourceNAT, double rawUsageHours, @Nullable String usage, @Nullable String type, @Nullable UsageType usageType) {
> -      this.id = checkNotNull(id, "id");
> +      this.id = id;

@abayer Ping..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106/files#r5928143

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Phillips <no...@github.com>.
> @@ -345,7 +345,7 @@ protected UsageRecord(String id, @Nullable String description, @Nullable String
>                           @Nullable String releaseDate, @Nullable String zoneId, @Nullable String virtualMachineId, @Nullable String virtualMachineName,
>                           @Nullable String serviceOfferingId, @Nullable String templateId, @Nullable String ipAddress,
>                           boolean isSourceNAT, double rawUsageHours, @Nullable String usage, @Nullable String type, @Nullable UsageType usageType) {
> -      this.id = checkNotNull(id, "id");
> +      this.id = id;

Why this change? If `id` is nullable, should the method parameter not be annotated? If it's **not** nullable, why omit the check?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106/files#r5888068

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by e-do <no...@github.com>.
Thank you for the command. I was able to squash all the changes into one commit on my local repo, however, when I attempt to push it to my fork, it says that I am 3 commits behind, so it won't let me push these changes. What is the best course of action in this scenario? I appreciate your patience. I am still learning about all the ins and outs of git. It is quite different from svn.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22447665

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by Andrew Bayer <no...@github.com>.
Committed (after tweaking the commit message slightly) - thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22527050

Re: [jclouds] JCLOUDS-241: Added missing options to ListUsageRecordsOptions (#106)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #122](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/122/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/106#issuecomment-22369792