diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/AssociateIPAddressOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/AssociateIPAddressOptions.java index 0cbaf419d4..da81895e1a 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/AssociateIPAddressOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/AssociateIPAddressOptions.java @@ -40,6 +40,15 @@ public class AssociateIPAddressOptions extends AccountInDomainOptions { } + /** + * @param projectId + * Project for the IP + */ + public AssociateIPAddressOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + public static class Builder { /** @@ -65,6 +74,14 @@ public class AssociateIPAddressOptions extends AccountInDomainOptions { AssociateIPAddressOptions options = new AssociateIPAddressOptions(); return options.domainId(domainId); } + + /** + * @see AssociateIPAddressOptions#projectId(String) + */ + public static AssociateIPAddressOptions projectId(String projectId) { + AssociateIPAddressOptions options = new AssociateIPAddressOptions(); + return options.projectId(projectId); + } } /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateNetworkOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateNetworkOptions.java index 48c9c97630..fe369ab637 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateNetworkOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateNetworkOptions.java @@ -102,6 +102,15 @@ public class CreateNetworkOptions extends AccountInDomainOptions { return this; } + /** + * @param projectId + * the project this network will be in. + */ + public CreateNetworkOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + public static class Builder { /** * @see CreateNetworkOptions#isDefault @@ -182,6 +191,14 @@ public class CreateNetworkOptions extends AccountInDomainOptions { CreateNetworkOptions options = new CreateNetworkOptions(); return options.domainId(domainId); } + + /** + * @see CreateNetworkOptions#projectId(String) + */ + public static CreateNetworkOptions projectId(String projectId) { + CreateNetworkOptions options = new CreateNetworkOptions(); + return options.projectId(projectId); + } } /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVMGroupOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVMGroupOptions.java index e1b4cdf2b0..60506c788f 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVMGroupOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVMGroupOptions.java @@ -48,6 +48,14 @@ public class CreateVMGroupOptions extends BaseHttpRequestOptions { return this; } + /** + * @param projectId the project the vm group will be in + */ + public CreateVMGroupOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + public static class Builder { /** * @see org.jclouds.cloudstack.options.CreateVMGroupOptions#account @@ -64,6 +72,14 @@ public class CreateVMGroupOptions extends BaseHttpRequestOptions { CreateVMGroupOptions options = new CreateVMGroupOptions(); return options.domainId(id); } + + /** + * @see org.jclouds.cloudstack.options.CreateVMGroupOptions#projectId(String) + */ + public static CreateVMGroupOptions projectId(String id) { + CreateVMGroupOptions options = new CreateVMGroupOptions(); + return options.projectId(id); + } } } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVlanIPRangeOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVlanIPRangeOptions.java index 1ebaf4268b..397b3161fd 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVlanIPRangeOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVlanIPRangeOptions.java @@ -67,6 +67,10 @@ public class CreateVlanIPRangeOptions extends AccountInDomainOptions { return new CreateVlanIPRangeOptions().networkId(networkId); } + public static CreateVlanIPRangeOptions projectId(String projectId) { + return new CreateVlanIPRangeOptions().projectId(projectId); + } + } @Override @@ -118,4 +122,9 @@ public class CreateVlanIPRangeOptions extends AccountInDomainOptions { this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId+"")); return this; } + + public CreateVlanIPRangeOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId+"")); + return this; + } } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/DeployVirtualMachineOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/DeployVirtualMachineOptions.java index c9d14eb89b..dcec8f6c51 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/DeployVirtualMachineOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/DeployVirtualMachineOptions.java @@ -169,6 +169,14 @@ public class DeployVirtualMachineOptions extends AccountInDomainOptions { } } + /** + * @param projectId The project this VM will be in. + */ + public DeployVirtualMachineOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + /** * @param securityGroupId * security group applied to the virtual machine. Should be passed @@ -298,6 +306,14 @@ public class DeployVirtualMachineOptions extends AccountInDomainOptions { return options.networkIds(networkIds); } + /** + * @see DeployVirtualMachineOptions#projectId(String) + */ + public static DeployVirtualMachineOptions projectId(String id) { + DeployVirtualMachineOptions options = new DeployVirtualMachineOptions(); + return options.projectId(id); + } + /** * @see DeployVirtualMachineOptions#securityGroupId */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListEventsOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListEventsOptions.java index 058b1dfdae..166933d534 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListEventsOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListEventsOptions.java @@ -63,6 +63,11 @@ public class ListEventsOptions extends BaseHttpRequestOptions { return this; } + public ListEventsOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + public ListEventsOptions keyword(String keyword) { this.queryParameters.replaceValues("keyword", ImmutableSet.of(keyword)); return this; @@ -110,6 +115,11 @@ public class ListEventsOptions extends BaseHttpRequestOptions { return options.id(id); } + public static ListEventsOptions projectId(String projectId) { + final ListEventsOptions options = new ListEventsOptions(); + return options.projectId(projectId); + } + public static ListEventsOptions keyword(String keyword) { final ListEventsOptions options = new ListEventsOptions(); return options.keyword(keyword); diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListFirewallRulesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListFirewallRulesOptions.java index af370020c2..2679f95363 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListFirewallRulesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListFirewallRulesOptions.java @@ -48,6 +48,15 @@ public class ListFirewallRulesOptions extends AccountInDomainOptions { return this; } + /** + * @param projectId + * List firewall rules in this project. + */ + public ListFirewallRulesOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + /** * @param keyword * list by keyword @@ -85,6 +94,14 @@ public class ListFirewallRulesOptions extends AccountInDomainOptions { return options.ipAddressId(ipAddressId); } + /** + * @see ListFirewallRulesOptions#projectId(String) + */ + public static ListFirewallRulesOptions projectId(String projectId) { + ListFirewallRulesOptions options = new ListFirewallRulesOptions(); + return options.projectId(projectId); + } + /** * @see ListFirewallRulesOptions#keyword */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListIPForwardingRulesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListIPForwardingRulesOptions.java index a9c93dfd2b..856f3c1d27 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListIPForwardingRulesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListIPForwardingRulesOptions.java @@ -59,6 +59,16 @@ public class ListIPForwardingRulesOptions extends AccountInDomainOptions { } + /** + * @param projectId + * Lists all rules applied to VMs in the given project. + */ + public ListIPForwardingRulesOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + + } + public static class Builder { /** @@ -100,6 +110,14 @@ public class ListIPForwardingRulesOptions extends AccountInDomainOptions { ListIPForwardingRulesOptions options = new ListIPForwardingRulesOptions(); return options.virtualMachineId(virtualMachineId); } + + /** + * @see ListIPForwardingRulesOptions#projectId(String) + */ + public static ListIPForwardingRulesOptions projectId(String projectId) { + ListIPForwardingRulesOptions options = new ListIPForwardingRulesOptions(); + return options.projectId(projectId); + } } /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListISOsOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListISOsOptions.java index 727f27480c..479b7c2eb7 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListISOsOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListISOsOptions.java @@ -67,6 +67,14 @@ public class ListISOsOptions extends AccountInDomainOptions { return this; } + /** + * @param projectId list ISOs in the given project + */ + public ListISOsOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + /** * @param isoFilter possible values are "featured", "self", "self-executable","executable", and "community". */ @@ -174,6 +182,13 @@ public class ListISOsOptions extends AccountInDomainOptions { return new ListISOsOptions().id(id); } + /** + * @param projectId list ISOs in project + */ + public static ListISOsOptions projectId(String projectId) { + return new ListISOsOptions().projectId(projectId); + } + /** * @param isoFilter possible values are "featured", "self", "self-executable","executable", and "community". */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListLoadBalancerRulesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListLoadBalancerRulesOptions.java index c9483f47d8..a3b77927a5 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListLoadBalancerRulesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListLoadBalancerRulesOptions.java @@ -74,6 +74,14 @@ public class ListLoadBalancerRulesOptions extends AccountInDomainOptions { return this; } + /** + * @param projectId the project ID + */ + public ListLoadBalancerRulesOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + /** * @param page the number of the page */ @@ -148,6 +156,14 @@ public class ListLoadBalancerRulesOptions extends AccountInDomainOptions { return options.zoneId(zoneId); } + /** + * @see ListLoadBalancerRulesOptions#projectId(String) + */ + public static ListLoadBalancerRulesOptions projectId(String projectId) { + ListLoadBalancerRulesOptions options = new ListLoadBalancerRulesOptions(); + return options.projectId(projectId); + } + /** * @see ListLoadBalancerRulesOptions#page */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListNetworksOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListNetworksOptions.java index 4b3e0f1375..f364158d09 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListNetworksOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListNetworksOptions.java @@ -88,6 +88,16 @@ public class ListNetworksOptions extends AccountInDomainOptions { } + /** + * @param projectId + * the project ID of the network + */ + public ListNetworksOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + + } + /** * @param trafficType * type of the traffic @@ -162,6 +172,14 @@ public class ListNetworksOptions extends AccountInDomainOptions { return options.zoneId(id); } + /** + * @see ListNetworksOptions#projectId(String) + */ + public static ListNetworksOptions projectId(String id) { + ListNetworksOptions options = new ListNetworksOptions(); + return options.projectId(id); + } + /** * @see ListNetworksOptions#trafficType */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListPortForwardingRulesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListPortForwardingRulesOptions.java index 26bb2d674a..c14a1d54dd 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListPortForwardingRulesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListPortForwardingRulesOptions.java @@ -49,6 +49,15 @@ public class ListPortForwardingRulesOptions extends AccountInDomainOptions { } + /** + * @param projectId + * list the rules in this project + */ + public ListPortForwardingRulesOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + + } public static class Builder { /** @@ -67,6 +76,14 @@ public class ListPortForwardingRulesOptions extends AccountInDomainOptions { return options.ipAddressId(ipAddressId); } + /** + * @see ListPortForwardingRulesOptions#projectId(String) + */ + public static ListPortForwardingRulesOptions projectId(String projectId) { + ListPortForwardingRulesOptions options = new ListPortForwardingRulesOptions(); + return options.projectId(projectId); + } + /** * @see ListPortForwardingRulesOptions#accountInDomain */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListPublicIPAddressesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListPublicIPAddressesOptions.java index e4f2084331..848a27750b 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListPublicIPAddressesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListPublicIPAddressesOptions.java @@ -59,6 +59,16 @@ public class ListPublicIPAddressesOptions extends AccountInDomainOptions { } + /** + * @param projectId + * list ip addresss by project. + */ + public ListPublicIPAddressesOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + + } + /** * @param VLANId * lists all public IP addresses by VLAN ID @@ -147,6 +157,14 @@ public class ListPublicIPAddressesOptions extends AccountInDomainOptions { return options.networkId(id); } + /** + * @see ListPublicIPAddressesOptions#projectId(String) + */ + public static ListPublicIPAddressesOptions projectId(String id) { + ListPublicIPAddressesOptions options = new ListPublicIPAddressesOptions(); + return options.projectId(id); + } + /** * @see ListPublicIPAddressesOptions#VLANId */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListResourceLimitsOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListResourceLimitsOptions.java index 48c6c1718c..aafc192c79 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListResourceLimitsOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListResourceLimitsOptions.java @@ -61,6 +61,17 @@ public class ListResourceLimitsOptions extends BaseHttpRequestOptions { return this; } + /** + * Lists resource limits by project. + * + * @param projectId the project + * @return ListResourceLimitsOptions + */ + public ListResourceLimitsOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(String.valueOf(projectId + ""))); + return this; + } + /** * List by keyword * @@ -116,6 +127,14 @@ public class ListResourceLimitsOptions extends BaseHttpRequestOptions { return options.id(id); } + /** + * @see ListResourceLimitsOptions#projectId(String) + */ + public static ListResourceLimitsOptions projectId(String projectId) { + ListResourceLimitsOptions options = new ListResourceLimitsOptions(); + return options.projectId(projectId); + } + /** * @see ListResourceLimitsOptions#keyword(String) */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSSHKeyPairsOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSSHKeyPairsOptions.java index 9bf3f5b5a7..9700b3eff6 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSSHKeyPairsOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSSHKeyPairsOptions.java @@ -36,6 +36,15 @@ public class ListSSHKeyPairsOptions extends BaseHttpRequestOptions { return this; } + /** + * @param projectId + * the project to list in + */ + public ListSSHKeyPairsOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectId", ImmutableSet.of(projectId + "")); + return this; + } + public static class Builder { /** * @see ListSSHKeyPairsOptions#name @@ -45,5 +54,13 @@ public class ListSSHKeyPairsOptions extends BaseHttpRequestOptions { return options.name(name); } + /** + * @see ListSSHKeyPairsOptions#projectId(String) + */ + public static ListSSHKeyPairsOptions projectId(String projectId) { + ListSSHKeyPairsOptions options = new ListSSHKeyPairsOptions(); + return options.projectId(projectId); + } + } } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSecurityGroupsOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSecurityGroupsOptions.java index 050bcb45a3..cad55e501b 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSecurityGroupsOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSecurityGroupsOptions.java @@ -60,6 +60,15 @@ public class ListSecurityGroupsOptions extends AssociateIPAddressOptions { } + /** + * @param projectId + * the ID of the project to search in. + */ + public ListSecurityGroupsOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + public static class Builder { /** @@ -86,6 +95,14 @@ public class ListSecurityGroupsOptions extends AssociateIPAddressOptions { return options.virtualMachineId(virtualMachineId); } + /** + * @see ListSecurityGroupsOptions#projectId(String) + */ + public static ListSecurityGroupsOptions projectId(String projectId) { + ListSecurityGroupsOptions options = new ListSecurityGroupsOptions(); + return options.projectId(projectId); + } + /** * @see DeployVirtualMachineOptions#accountInDomain */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSnapshotsOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSnapshotsOptions.java index 605a851e92..fa142eb139 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSnapshotsOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListSnapshotsOptions.java @@ -87,6 +87,14 @@ public class ListSnapshotsOptions extends AccountInDomainOptions { return this; } + /** + * @param projectId the project to list in + */ + public ListSnapshotsOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + public static class Builder { /** @@ -152,6 +160,13 @@ public class ListSnapshotsOptions extends AccountInDomainOptions { public static ListSnapshotsOptions volumeId(String volumeId) { return new ListSnapshotsOptions().volumeId(volumeId); } + + /** + * @param projectId the project to list in + */ + public static ListSnapshotsOptions projectId(String projectId) { + return new ListSnapshotsOptions().projectId(projectId); + } } } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListTemplatesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListTemplatesOptions.java index 0c9bd4e6db..709a8bbb5e 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListTemplatesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListTemplatesOptions.java @@ -72,6 +72,16 @@ public class ListTemplatesOptions extends AccountInDomainOptions { } + /** + * @param projectId + * list templates by projectId. + */ + public ListTemplatesOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + + } + /** * @param hypervisor * the hypervisor for which to restrict the search @@ -131,6 +141,14 @@ public class ListTemplatesOptions extends AccountInDomainOptions { return options.zoneId(id); } + /** + * @see ListTemplatesOptions#projectId(String) + */ + public static ListTemplatesOptions projectId(String projectId) { + ListTemplatesOptions options = new ListTemplatesOptions(); + return options.projectId(projectId); + } + /** * @see ListTemplatesOptions#hypervisor */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListUsageRecordsOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListUsageRecordsOptions.java index ebc601064a..324e2fc4d3 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListUsageRecordsOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListUsageRecordsOptions.java @@ -43,6 +43,11 @@ public class ListUsageRecordsOptions extends AccountInDomainOptions { return options.accountId(accountId); } + public static ListUsageRecordsOptions projectId(String projectId) { + ListUsageRecordsOptions options = new ListUsageRecordsOptions(); + return options.projectId(projectId); + } + public static ListUsageRecordsOptions keyword(String keyword) { ListUsageRecordsOptions options = new ListUsageRecordsOptions(); return options.keyword(keyword); @@ -64,6 +69,11 @@ public class ListUsageRecordsOptions extends AccountInDomainOptions { return this; } + public ListUsageRecordsOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + public ListUsageRecordsOptions keyword(String keyword) { this.queryParameters.replaceValues("keyword", ImmutableSet.of(keyword)); return this; diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVMGroupsOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVMGroupsOptions.java index 731e4e2d32..b9ba4d9688 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVMGroupsOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVMGroupsOptions.java @@ -56,6 +56,14 @@ public class ListVMGroupsOptions extends BaseHttpRequestOptions { return this; } + /** + * @param projectId id of the project the vm group is in + */ + public ListVMGroupsOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + /** * @param keyword keyword to search on */ @@ -97,6 +105,14 @@ public class ListVMGroupsOptions extends BaseHttpRequestOptions { return options.domainId(id); } + /** + * @see org.jclouds.cloudstack.options.ListVMGroupsOptions#projectId(String) + */ + public static ListVMGroupsOptions projectId(String id) { + ListVMGroupsOptions options = new ListVMGroupsOptions(); + return options.projectId(id); + } + /** * @see org.jclouds.cloudstack.options.ListVMGroupsOptions#keyword */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVirtualMachinesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVirtualMachinesOptions.java index 2a538f2308..95c26eab88 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVirtualMachinesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVirtualMachinesOptions.java @@ -97,6 +97,16 @@ public class ListVirtualMachinesOptions extends AccountInDomainOptions { } + /** + * @param projectId + * list virtual machines by projectId. + */ + public ListVirtualMachinesOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + + } + /** * @param zoneId * list virtual machines by zoneId. @@ -191,6 +201,14 @@ public class ListVirtualMachinesOptions extends AccountInDomainOptions { return options.podId(id); } + /** + * @see ListVirtualMachinesOptions#projectId(String) + */ + public static ListVirtualMachinesOptions projectId(String id) { + ListVirtualMachinesOptions options = new ListVirtualMachinesOptions(); + return options.projectId(id); + } + /** * @see ListVirtualMachinesOptions#zoneId */ diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVlanIPRangesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVlanIPRangesOptions.java index 30ca63c5da..11b5d8b153 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVlanIPRangesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVlanIPRangesOptions.java @@ -55,6 +55,10 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions { return new ListVlanIPRangesOptions().podId(podId); } + public static ListVlanIPRangesOptions projectId(String projectId) { + return new ListVlanIPRangesOptions().projectId(projectId); + } + public static ListVlanIPRangesOptions vlan(long vlan) { return new ListVlanIPRangesOptions().vlan(vlan); } @@ -103,6 +107,11 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions { return this; } + public ListVlanIPRangesOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId+"")); + return this; + } + public ListVlanIPRangesOptions vlan(String vlan) { this.queryParameters.replaceValues("vlan", ImmutableSet.of(vlan)); return this; diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVolumesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVolumesOptions.java index c045f3b666..d26c647fa8 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVolumesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVolumesOptions.java @@ -107,6 +107,15 @@ public class ListVolumesOptions extends AccountInDomainOptions { } + /** + * @param projectId list volumes by projectId. + */ + public ListVolumesOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + + } + public static class Builder { @@ -198,6 +207,14 @@ public class ListVolumesOptions extends AccountInDomainOptions { ListVolumesOptions options = new ListVolumesOptions(); return options.zoneId(id); } + + /** + * @see ListVolumesOptions#projectId(String) + */ + public static ListVolumesOptions projectId(String id) { + ListVolumesOptions options = new ListVolumesOptions(); + return options.projectId(id); + } } /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/RegisterISOOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/RegisterISOOptions.java index fdb77b88fd..acdf5cce6e 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/RegisterISOOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/RegisterISOOptions.java @@ -69,6 +69,14 @@ public class RegisterISOOptions extends AccountInDomainOptions { return this; } + /** + * @param projectId the project this ISO will be in. + */ + public RegisterISOOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + public static class Builder { /** @@ -119,6 +127,13 @@ public class RegisterISOOptions extends AccountInDomainOptions { public static RegisterISOOptions osTypeId(String osTypeId) { return new RegisterISOOptions().osTypeId(osTypeId); } + + /** + * @param projectId the project this ISO will be in. + */ + public static RegisterISOOptions projectId(String projectId) { + return new RegisterISOOptions().projectId(projectId); + } } } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/RegisterTemplateOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/RegisterTemplateOptions.java index 738e243a10..01c79c1be0 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/RegisterTemplateOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/RegisterTemplateOptions.java @@ -46,6 +46,14 @@ public class RegisterTemplateOptions extends AccountInDomainOptions { return this; } + /** + * the project for this template. + */ + public RegisterTemplateOptions projectId(String projectId) { + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); + return this; + } + /** * true if the template or its derivatives are extractable; default is true */ @@ -98,6 +106,11 @@ public class RegisterTemplateOptions extends AccountInDomainOptions { return options.checksum(checksum); } + public static RegisterTemplateOptions projectId(String projectId) { + RegisterTemplateOptions options = new RegisterTemplateOptions(); + return options.projectId(projectId); + } + public static RegisterTemplateOptions isExtractable(boolean isExtractable) { RegisterTemplateOptions options = new RegisterTemplateOptions(); return options.isExtractable(isExtractable); diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/UpdateTemplatePermissionsOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/UpdateTemplatePermissionsOptions.java index 1dedd7dca4..d7558f38ab 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/UpdateTemplatePermissionsOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/UpdateTemplatePermissionsOptions.java @@ -39,6 +39,14 @@ public class UpdateTemplatePermissionsOptions extends BaseHttpRequestOptions { return this; } + /** + * a list of projects. If specified, "op" parameter has to be passed in. + */ + public UpdateTemplatePermissionsOptions projectIds(Iterable projectIds) { + this.queryParameters.replaceValues("projectids", ImmutableSet.of(Joiner.on(',').join(projectIds))); + return this; + } + /** * true if the template/iso is extractable, false other wise. Can be set only by root admin */ @@ -82,6 +90,11 @@ public class UpdateTemplatePermissionsOptions extends BaseHttpRequestOptions { return options.accounts(accounts); } + public static UpdateTemplatePermissionsOptions projectIds(Iterable projectIds) { + UpdateTemplatePermissionsOptions options = new UpdateTemplatePermissionsOptions(); + return options.projectIds(projectIds); + } + public static UpdateTemplatePermissionsOptions isExtractable(boolean isExtractable) { UpdateTemplatePermissionsOptions options = new UpdateTemplatePermissionsOptions(); return options.isExtractable(isExtractable);