http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/ListVolumesOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/ListVolumesOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/ListVolumesOptions.java deleted file mode 100644 index fb11c3b..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/ListVolumesOptions.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.cloudstack.domain.Volume; - -import com.google.common.collect.ImmutableSet; - -/** - * Options used to control what volume - */ -public class ListVolumesOptions extends AccountInDomainOptions { - - public static final ListVolumesOptions NONE = new ListVolumesOptions(); - - /** - * List volumes on specified host - * - * @param hostId hostId. - */ - public ListVolumesOptions hostId(String hostId) { - this.queryParameters.replaceValues("hostid", ImmutableSet.of(hostId + "")); - return this; - } - - /** - * @param id the ID of the volume - */ - public ListVolumesOptions id(String id) { - this.queryParameters.replaceValues("id", ImmutableSet.of(id + "")); - return this; - } - - /** - * @param recursive defaults to false, but if true, lists all volumes from the parent specified by the domain id till leaves. - */ - public ListVolumesOptions isRecursive(boolean recursive) { - this.queryParameters.replaceValues("isrecursive", ImmutableSet.of(String.valueOf(recursive))); - return this; - } - - - /** - * @param keyword List by keyword - */ - public ListVolumesOptions keyword(String keyword) { - this.queryParameters.replaceValues("keyword", ImmutableSet.of(keyword)); - return this; - } - - /** - * @param name the name of the disk volume - */ - public ListVolumesOptions name(String name) { - this.queryParameters.replaceValues("name", ImmutableSet.of(name)); - return this; - } - - /** - * @param podId the pod id the disk volume belongs to - */ - public ListVolumesOptions podId(String podId) { - this.queryParameters.replaceValues("podid", ImmutableSet.of(podId + "")); - return this; - - } - - /** - * @param type the type of the disk volume - */ - public ListVolumesOptions type(Volume.Type type) { - this.queryParameters.replaceValues("type", ImmutableSet.of(type .toString())); - return this; - } - - /** - * @param virtualMachineId list volumes by id virtual machine. - */ - public ListVolumesOptions virtualMachineId(String virtualMachineId) { - this.queryParameters.replaceValues("virtualmachineid", ImmutableSet.of(virtualMachineId + "")); - return this; - - } - - /** - * @param zoneId list volumes by zoneId. - */ - public ListVolumesOptions zoneId(String zoneId) { - this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + "")); - return this; - - } - - /** - * @param projectId list volumes by projectId. - */ - public ListVolumesOptions projectId(String projectId) { - this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); - return this; - - } - - - public static class Builder { - - /** - * @see ListVolumesOptions#accountInDomain - */ - public static ListVolumesOptions accountInDomain(String account, String domain) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.accountInDomain(account, domain); - } - - /** - * @see ListVolumesOptions#domainId - */ - public static ListVolumesOptions domainId(String id) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.domainId(id); - } - - /** - * @see ListVolumesOptions#hostId - */ - public static ListVolumesOptions hostId(String id) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.hostId(id); - } - - /** - * @see ListVolumesOptions#id - */ - public static ListVolumesOptions id(String id) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.id(id); - } - - /** - * @see ListVolumesOptions#isRecursive(boolean) - */ - public static ListVolumesOptions isRecursive(boolean recursive) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.isRecursive(recursive); - } - - /** - * @see ListVolumesOptions#name - */ - public static ListVolumesOptions keyword(String keyword) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.keyword(keyword); - } - - /** - * @see ListVolumesOptions#name - */ - public static ListVolumesOptions name(String name) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.name(name); - } - - - /** - * @see ListVolumesOptions#podId - */ - public static ListVolumesOptions podId(String id) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.podId(id); - } - - /** - * @see ListVolumesOptions#type - */ - public static ListVolumesOptions type(Volume.Type type) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.type(type); - } - - /** - * @see ListVolumesOptions#virtualMachineId(String) - */ - public static ListVolumesOptions virtualMachineId(String virtualMachineId) { - ListVolumesOptions options = new ListVolumesOptions(); - return options.virtualMachineId(virtualMachineId); - } - - /** - * @see ListVolumesOptions#zoneId - */ - public static ListVolumesOptions zoneId(String id) { - 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); - } - } - - /** - * {@inheritDoc} - */ - @Override - public ListVolumesOptions accountInDomain(String account, String domain) { - return ListVolumesOptions.class.cast(super.accountInDomain(account, domain)); - } - - /** - * {@inheritDoc} - */ - @Override - public ListVolumesOptions domainId(String domainId) { - return ListVolumesOptions.class.cast(super.domainId(domainId)); - } -}
http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/ListZonesOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/ListZonesOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/ListZonesOptions.java deleted file mode 100644 index db7dfb2..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/ListZonesOptions.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Options used to control what zones information is returned - * - * @see <a - * href="http://download.cloud.com/releases/2.2.0/api/user/listZones.html" - * /> - */ -public class ListZonesOptions extends BaseHttpRequestOptions { - - public static final ListZonesOptions NONE = new ListZonesOptions(); - - /** - * @param id - * the ID of the zone - */ - public ListZonesOptions id(String id) { - this.queryParameters.replaceValues("id", ImmutableSet.of(id + "")); - return this; - } - - /** - * @param domainId - * the ID of the domain associated with the zone - */ - public ListZonesOptions domainId(String domainId) { - this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + "")); - return this; - - } - - /** - * @param available - * true if you want to retrieve all available Zones. False if you - * only want to return the Zones from which you have at least one - * VM. Default is false. - */ - public ListZonesOptions available(boolean available) { - this.queryParameters.replaceValues("available", ImmutableSet.of(available + "")); - return this; - } - - public static class Builder { - - /** - * @see ListZonesOptions#available - */ - public static ListZonesOptions available(boolean available) { - ListZonesOptions options = new ListZonesOptions(); - return options.available(available); - } - - /** - * @see ListZonesOptions#domainId - */ - public static ListZonesOptions domainId(String id) { - ListZonesOptions options = new ListZonesOptions(); - return options.domainId(id); - } - - /** - * @see ListZonesOptions#id - */ - public static ListZonesOptions id(String id) { - ListZonesOptions options = new ListZonesOptions(); - return options.id(id); - } - - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/RegisterISOOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/RegisterISOOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/RegisterISOOptions.java deleted file mode 100644 index 16a923f..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/RegisterISOOptions.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import com.google.common.collect.ImmutableSet; - -/** - * Options for the ISO registerISO method. - * - * @see org.jclouds.cloudstack.features.ISOApi#registerISO - * @see org.jclouds.cloudstack.features.ISOApi#registerISO - */ -public class RegisterISOOptions extends AccountInDomainOptions { - - public static final RegisterISOOptions NONE = new RegisterISOOptions(); - - /** - * @param bootable true if this ISO is bootable - */ - public RegisterISOOptions bootable(boolean bootable) { - this.queryParameters.replaceValues("bootable", ImmutableSet.of(bootable + "")); - return this; - } - - /** - * @param isExtractable true if the iso or its derivatives are extractable; default is false - */ - public RegisterISOOptions isExtractable(boolean isExtractable) { - this.queryParameters.replaceValues("isextractable", ImmutableSet.of(isExtractable + "")); - return this; - } - - /** - * @param isFeatured true if you want this ISO to be featured - */ - public RegisterISOOptions isFeatured(boolean isFeatured) { - this.queryParameters.replaceValues("isfeatured", ImmutableSet.of(isFeatured + "")); - return this; - } - - /** - * @param isPublic true if you want to register the ISO to be publicly available to all users, false otherwise. - */ - public RegisterISOOptions isPublic(boolean isPublic) { - this.queryParameters.replaceValues("ispublic", ImmutableSet.of(isPublic + "")); - return this; - } - - /** - * @param osTypeId the ID of the OS Type that best represents the OS of this ISO - */ - public RegisterISOOptions osTypeId(String osTypeId) { - this.queryParameters.replaceValues("ostypeid", ImmutableSet.of(osTypeId + "")); - 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 { - - /** - * @param account an optional account name. Must be used with domainId. - */ - public static RegisterISOOptions accountInDomain(String account, String domainId) { - return (RegisterISOOptions) new RegisterISOOptions().accountInDomain(account, domainId); - } - - /** - * @param bootable true if this ISO is bootable - */ - public static RegisterISOOptions bootable(boolean bootable) { - return new RegisterISOOptions().bootable(bootable); - } - - /** - * @param domainId an optional domainId. If the account parameter is used, domainId must also be used. - */ - public static RegisterISOOptions domainId(String domainId) { - return (RegisterISOOptions) new RegisterISOOptions().domainId(domainId); - } - - /** - * @param isExtractable true if the iso or its derivatives are extractable; default is false - */ - public static RegisterISOOptions isExtractable(boolean isExtractable) { - return new RegisterISOOptions().isExtractable(isExtractable); - } - - /** - * @param isFeatured true if you want this ISO to be featured - */ - public static RegisterISOOptions isFeatured(boolean isFeatured) { - return new RegisterISOOptions().isFeatured(isFeatured); - } - - /** - * @param isPublic true if you want to register the ISO to be publicly available to all users, false otherwise. - */ - public static RegisterISOOptions isPublic(boolean isPublic) { - return new RegisterISOOptions().isPublic(isPublic); - } - - /** - * @param osTypeId the ID of the OS Type that best represents the OS of this ISO - */ - 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); - } - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/RegisterTemplateOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/RegisterTemplateOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/RegisterTemplateOptions.java deleted file mode 100644 index 60462c7..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/RegisterTemplateOptions.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import com.google.common.collect.ImmutableSet; - -/** - * Options used to control how a template is registered. - * - * @see <a - * href="http://download.cloud.com/releases/2.2.8/api/user/registerTemplate.html" - * /> - */ -public class RegisterTemplateOptions extends AccountInDomainOptions { - - public static final RegisterTemplateOptions NONE = new RegisterTemplateOptions(); - - /** - * 32 or 64 bits support. 64 by default - */ - public RegisterTemplateOptions bits(int bits) { - this.queryParameters.replaceValues("bits", ImmutableSet.of(bits + "")); - return this; - } - - /** - * the MD5 checksum value of this template - */ - public RegisterTemplateOptions checksum(String checksum) { - this.queryParameters.replaceValues("checksum", ImmutableSet.of(checksum)); - 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 - */ - public RegisterTemplateOptions isExtractable(boolean isExtractable) { - this.queryParameters.replaceValues("isextractable", ImmutableSet.of(isExtractable + "")); - return this; - } - - /** - * true if this template is a featured template, false otherwise - */ - public RegisterTemplateOptions isFeatured(boolean isFeatured) { - this.queryParameters.replaceValues("isfeatured", ImmutableSet.of(isFeatured + "")); - return this; - } - - /** - * true if the template is available to all accounts; default is true - */ - public RegisterTemplateOptions isPublic(boolean isPublic) { - this.queryParameters.replaceValues("ispublic", ImmutableSet.of(isPublic + "")); - return this; - } - - /** - * true if the template supports the password reset feature; default is false - */ - public RegisterTemplateOptions passwordEnabled(boolean passwordEnabled) { - this.queryParameters.replaceValues("passwordenabled", ImmutableSet.of(passwordEnabled + "")); - return this; - } - - /** - * true if this template requires HVM - */ - public RegisterTemplateOptions requiresHVM(boolean requiresHVM) { - this.queryParameters.replaceValues("requireshvm", ImmutableSet.of(requiresHVM + "")); - return this; - } - - public static class Builder { - - public static RegisterTemplateOptions bits(int bits) { - RegisterTemplateOptions options = new RegisterTemplateOptions(); - return options.bits(bits); - } - - public static RegisterTemplateOptions checksum(String checksum) { - RegisterTemplateOptions options = new RegisterTemplateOptions(); - 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); - } - - public static RegisterTemplateOptions isFeatured(boolean isFeatured) { - RegisterTemplateOptions options = new RegisterTemplateOptions(); - return options.isFeatured(isFeatured); - } - - public static RegisterTemplateOptions isPublic(boolean isPublic) { - RegisterTemplateOptions options = new RegisterTemplateOptions(); - return options.isPublic(isPublic); - } - - public static RegisterTemplateOptions passwordEnabled(boolean passwordEnabled) { - RegisterTemplateOptions options = new RegisterTemplateOptions(); - return options.passwordEnabled(passwordEnabled); - } - - public static RegisterTemplateOptions requiresHVM(boolean requiresHVM) { - RegisterTemplateOptions options = new RegisterTemplateOptions(); - return options.requiresHVM(requiresHVM); - } - - /** - * @see AccountInDomainOptions#accountInDomain - */ - public static RegisterTemplateOptions accountInDomain(String account, String domain) { - RegisterTemplateOptions options = new RegisterTemplateOptions(); - return (RegisterTemplateOptions)options.accountInDomain(account, domain); - } - - /** - * @see AccountInDomainOptions#domainId - */ - public static RegisterTemplateOptions domainId(String domainId) { - RegisterTemplateOptions options = new RegisterTemplateOptions(); - return (RegisterTemplateOptions)options.domainId(domainId); - } - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/StopVirtualMachineOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/StopVirtualMachineOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/StopVirtualMachineOptions.java deleted file mode 100644 index e716ae5..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/StopVirtualMachineOptions.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Options for stopping virtual machines. - * - * @see <a - * href="http://download.cloud.com/releases/3.0.3/api_3.0.3/root_admin/stopVirtualMachine.html" - * /> - */ -public class StopVirtualMachineOptions extends BaseHttpRequestOptions { - - public static final StopVirtualMachineOptions NONE = new StopVirtualMachineOptions(); - - /** - * @param forced - * Whether to force stop the virtual machine. Defaults to false. - */ - public StopVirtualMachineOptions forced(boolean forced) { - this.queryParameters.replaceValues("forced", ImmutableSet.of(forced + "")); - return this; - } - - public static class Builder { - - /** - * @see StopVirtualMachineOptions#forced - */ - public static StopVirtualMachineOptions forced(boolean forced) { - StopVirtualMachineOptions options = new StopVirtualMachineOptions(); - return options.forced(forced); - } - - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateAccountOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateAccountOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateAccountOptions.java deleted file mode 100644 index fb29827..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateAccountOptions.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Optional arguments for updating an Account - * - * @see <a - * href="http://download.cloud.com/releases/2.2.0/api_2.2.12/global_admin/updateAccount.html" - * /> - */ -public class UpdateAccountOptions extends BaseHttpRequestOptions { - - public static final UpdateAccountOptions NONE = new UpdateAccountOptions(); - - /** - * @param networkDomain - * network domain for the account's networks - */ - public UpdateAccountOptions networkDomain(String networkDomain) { - this.queryParameters.replaceValues("networkdomain", ImmutableSet.<String>of(networkDomain)); - return this; - } - - public static class Builder { - - /** - * @see UpdateAccountOptions#networkDomain - */ - public static UpdateAccountOptions networkDomain(String networkDomain) { - UpdateAccountOptions options = new UpdateAccountOptions(); - return options.networkDomain(networkDomain); - } - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateClusterOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateClusterOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateClusterOptions.java deleted file mode 100644 index 3112120..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateClusterOptions.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.cloudstack.domain.AllocationState; -import org.jclouds.cloudstack.domain.Cluster; -import org.jclouds.cloudstack.domain.Host; -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Options for the GlobalHostApi.updateCluster() API call. - */ -public class UpdateClusterOptions extends BaseHttpRequestOptions { - - public static final UpdateClusterOptions NONE = new UpdateClusterOptions(); - - /** - * @param allocationState Allocation state of this cluster for allocation of new resources - */ - public UpdateClusterOptions allocationState(AllocationState allocationState) { - this.queryParameters.replaceValues("allocationstate", ImmutableSet.<String>of(allocationState.toString())); - return this; - } - - /** - * @param clusterName the cluster name - */ - public UpdateClusterOptions clusterName(String clusterName) { - this.queryParameters.replaceValues("clustername", ImmutableSet.<String>of(clusterName)); - return this; - } - - /** - * @param clusterType type of the cluster - */ - public UpdateClusterOptions clusterType(Host.ClusterType clusterType) { - this.queryParameters.replaceValues("clustertype", ImmutableSet.<String>of(clusterType.toString())); - return this; - } - - /** - * @param hypervisor hypervisor type of the cluster - */ - public UpdateClusterOptions hypervisor(String hypervisor) { - this.queryParameters.replaceValues("hypervisor", ImmutableSet.<String>of(hypervisor)); - return this; - } - - /** - * @param managedState whether this cluster is managed by cloudstack - */ - public UpdateClusterOptions managedState(Cluster.ManagedState managedState) { - this.queryParameters.replaceValues("managedstate", ImmutableSet.<String>of(managedState.toString())); - return this; - } - - public static class Builder { - - /** - * @param allocationState Allocation state of this cluster for allocation of new resources - */ - public static UpdateClusterOptions allocationState(AllocationState allocationState) { - return new UpdateClusterOptions().allocationState(allocationState); - } - - /** - * @param clusterName the cluster name - */ - public static UpdateClusterOptions clusterName(String clusterName) { - return new UpdateClusterOptions().clusterName(clusterName); - } - - /** - * @param clusterType type of the cluster - */ - public static UpdateClusterOptions clusterType(Host.ClusterType clusterType) { - return new UpdateClusterOptions().clusterType(clusterType); - } - - /** - * @param hypervisor hypervisor type of the cluster - */ - public static UpdateClusterOptions hypervisor(String hypervisor) { - return new UpdateClusterOptions().hypervisor(hypervisor); - } - - /** - * @param managedState whether this cluster is managed by cloudstack - */ - public static UpdateClusterOptions managedState(Cluster.ManagedState managedState) { - return new UpdateClusterOptions().managedState(managedState); - } - - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateDiskOfferingOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateDiskOfferingOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateDiskOfferingOptions.java deleted file mode 100644 index 4bf03e7..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateDiskOfferingOptions.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import com.google.common.collect.ImmutableSet; - -/** - * Options to control how disk offerings are created - * - * @see <a - * href="http://download.cloud.com/releases/2.2.0/api_2.2.12/global_admin/updateDiskOffering.html" - * /> - */ -public class UpdateDiskOfferingOptions extends AccountInDomainOptions { - - public static final UpdateDiskOfferingOptions NONE = new UpdateDiskOfferingOptions(); - - /** - * @param name - * service offering name - */ - public UpdateDiskOfferingOptions name(String name) { - this.queryParameters.replaceValues("name", ImmutableSet.<String>of(name)); - return this; - } - - /** - * @param displayText - * service offering display text - */ - public UpdateDiskOfferingOptions displayText(String displayText) { - this.queryParameters.replaceValues("displaytext", ImmutableSet.<String>of(displayText)); - return this; - } - - public static class Builder { - - /** - * @see org.jclouds.cloudstack.options.UpdateDiskOfferingOptions#name - */ - public static UpdateDiskOfferingOptions name(String name) { - UpdateDiskOfferingOptions options = new UpdateDiskOfferingOptions(); - return options.name(name); - } - - /** - * @see org.jclouds.cloudstack.options.UpdateDiskOfferingOptions#displayText - */ - public static UpdateDiskOfferingOptions displayText(String displayText) { - UpdateDiskOfferingOptions options = new UpdateDiskOfferingOptions(); - return options.displayText(displayText); - } - - /** - * @see org.jclouds.cloudstack.options.UpdateDiskOfferingOptions#accountInDomain - */ - public static UpdateDiskOfferingOptions accountInDomain(String account, String domain) { - UpdateDiskOfferingOptions options = new UpdateDiskOfferingOptions(); - return options.accountInDomain(account, domain); - } - - /** - * @see org.jclouds.cloudstack.options.UpdateDiskOfferingOptions#domainId - */ - public static UpdateDiskOfferingOptions domainId(String domainId) { - UpdateDiskOfferingOptions options = new UpdateDiskOfferingOptions(); - return options.domainId(domainId); - } - } - - /** - * {@inheritDoc} - */ - @Override - public UpdateDiskOfferingOptions accountInDomain(String account, String domain) { - return UpdateDiskOfferingOptions.class.cast(super.accountInDomain(account, domain)); - } - - /** - * {@inheritDoc} - */ - @Override - public UpdateDiskOfferingOptions domainId(String domainId) { - return UpdateDiskOfferingOptions.class.cast(super.domainId(domainId)); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateDomainOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateDomainOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateDomainOptions.java deleted file mode 100644 index a2c2562..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateDomainOptions.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Options used to control how a domain is created - * - * @see <a href= - * "http://download.cloud.com/releases/2.2.0/api_2.2.12/global_admin/createDomain.html" - * /> - */ -public class UpdateDomainOptions extends BaseHttpRequestOptions { - - public static final UpdateDomainOptions NONE = new UpdateDomainOptions(); - - /** - * @param name - * the new name for this domain - */ - public UpdateDomainOptions name(String name) { - this.queryParameters.replaceValues("name", ImmutableSet.of(name)); - return this; - } - - /** - * @param networkDomain - * network domain for networks in the domain - */ - public UpdateDomainOptions networkDomain(String networkDomain) { - this.queryParameters.replaceValues("networkdomain", ImmutableSet.of(networkDomain)); - return this; - } - - public static class Builder { - - /** - * @see UpdateDomainOptions#name - */ - public static UpdateDomainOptions name(String name) { - UpdateDomainOptions options = new UpdateDomainOptions(); - return options.name(name); - } - - /** - * @see UpdateDomainOptions#networkDomain - */ - public static UpdateDomainOptions networkDomain(String networkDomain) { - UpdateDomainOptions options = new UpdateDomainOptions(); - return options.networkDomain(networkDomain); - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateHostOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateHostOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateHostOptions.java deleted file mode 100644 index 8c58e53..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateHostOptions.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import java.util.Set; - -import org.jclouds.cloudstack.domain.AllocationState; -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.base.Joiner; -import com.google.common.collect.ImmutableSet; - -/** - * Options to the GlobalHostApi.addHost() API call - */ -public class UpdateHostOptions extends BaseHttpRequestOptions { - - - public static final UpdateHostOptions NONE = new UpdateHostOptions(); - - /** - * @param allocationState Allocation state of this Host for allocation of new resources - */ - public UpdateHostOptions allocationState(AllocationState allocationState) { - this.queryParameters.replaceValues("allocationstate", ImmutableSet.of(allocationState.toString())); - return this; - } - - /** - * @param hostTags list of tags to be added to the host - */ - public UpdateHostOptions hostTags(Set<String> hostTags) { - this.queryParameters.replaceValues("hosttags", ImmutableSet.of(Joiner.on(',').join(hostTags))); - return this; - } - - /** - * @param osCategoryId the id of Os category to update the host with - */ - public UpdateHostOptions osCategoryId(String osCategoryId) { - this.queryParameters.replaceValues("oscategoryid", ImmutableSet.of(osCategoryId + "")); - return this; - } - - public static class Builder { - - /** - * @param allocationState Allocation state of this Host for allocation of new resources - */ - public static UpdateHostOptions allocationState(AllocationState allocationState) { - return new UpdateHostOptions().allocationState(allocationState); - } - - /** - * @param hostTags list of tags to be added to the host - */ - public static UpdateHostOptions hostTags(Set<String> hostTags) { - return new UpdateHostOptions().hostTags(hostTags); - } - - /** - * @param podId the Pod ID for the host - */ - public static UpdateHostOptions osCategoryId(String osCategoryId) { - return new UpdateHostOptions().osCategoryId(osCategoryId); - } - - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateISOOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateISOOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateISOOptions.java deleted file mode 100644 index d081a17..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateISOOptions.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Options for the ISO updateISO method. - * - * @see org.jclouds.cloudstack.features.ISOApi#updateISO - * @see org.jclouds.cloudstack.features.ISOApi#updateISO - */ -public class UpdateISOOptions extends BaseHttpRequestOptions { - - public static final UpdateISOOptions NONE = new UpdateISOOptions(); - - /** - * @param bootable true if image is bootable, false otherwise - */ - public UpdateISOOptions bootable(boolean bootable) { - this.queryParameters.replaceValues("bootable", ImmutableSet.of(bootable + "")); - return this; - } - - /** - * @param displayText the display text of the image - */ - public UpdateISOOptions displayText(String displayText) { - this.queryParameters.replaceValues("displaytext", ImmutableSet.of(displayText + "")); - return this; - } - - /** - * @param format the format for the image - */ - public UpdateISOOptions format(String format) { - this.queryParameters.replaceValues("format", ImmutableSet.of(format + "")); - return this; - } - - /** - * @param name the name of the image file - */ - public UpdateISOOptions name(String name) { - this.queryParameters.replaceValues("name", ImmutableSet.of(name + "")); - return this; - } - - /** - * @param osTypeId the ID of the OS type that best represents the OS of this image. - */ - public UpdateISOOptions osTypeId(String osTypeId) { - this.queryParameters.replaceValues("ostypeid", ImmutableSet.of(osTypeId + "")); - return this; - } - - /** - * @param passwordEnabled true if the image supports the password reset feature; default is false - */ - public UpdateISOOptions passwordEnabled(boolean passwordEnabled) { - this.queryParameters.replaceValues("passwordenabled", ImmutableSet.of(passwordEnabled + "")); - return this; - } - - public static class Builder { - - /** - * @param bootable true if image is bootable, false otherwise - */ - public static UpdateISOOptions bootable(boolean bootable) { - return new UpdateISOOptions().bootable(bootable); - } - - /** - * @param displayText the display text of the image - */ - public static UpdateISOOptions displayText(String displayText) { - return new UpdateISOOptions().displayText(displayText); - } - - /** - * @param format the format for the image - */ - public static UpdateISOOptions format(String format) { - return new UpdateISOOptions().format(format); - } - - /** - * @param name the name of the image file - */ - public static UpdateISOOptions name(String name) { - return new UpdateISOOptions().name(name); - } - - /** - * @param osTypeId the ID of the OS type that best represents the OS of this image. - */ - public static UpdateISOOptions osTypeId(String osTypeId) { - return new UpdateISOOptions().osTypeId(osTypeId); - } - - /** - * @param passwordEnabled true if the image supports the password reset feature; default is false - */ - public static UpdateISOOptions passwordEnabled(boolean passwordEnabled) { - return new UpdateISOOptions().passwordEnabled(passwordEnabled); - } - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateISOPermissionsOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateISOPermissionsOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateISOPermissionsOptions.java deleted file mode 100644 index 233e09c..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateISOPermissionsOptions.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.cloudstack.domain.PermissionOperation; -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.base.Joiner; -import com.google.common.collect.ImmutableSet; - -/** - * Options for the ISO updateISOPermissions method. - * - * @see org.jclouds.cloudstack.features.ISOApi#updateISOPermissions - * @see org.jclouds.cloudstack.features.ISOApi#updateISOPermissions - */ -public class UpdateISOPermissionsOptions extends BaseHttpRequestOptions { - - public static final UpdateISOPermissionsOptions NONE = new UpdateISOPermissionsOptions(); - - /** - * @param accounts a comma delimited list of accounts. If specified, "op" parameter has to be passed in. - */ - public UpdateISOPermissionsOptions accounts(Iterable<String> accounts) { - this.queryParameters.replaceValues("accounts", ImmutableSet.of(Joiner.on(',').join(accounts))); - return this; - } - - /** - * @param isExtractable true if the template/iso is extractable, false other wise. Can be set only by root admin - */ - public UpdateISOPermissionsOptions isExtractable(boolean isExtractable) { - this.queryParameters.replaceValues("isextractable", ImmutableSet.of(isExtractable + "")); - return this; - } - - /** - * @param isFeatured true for featured template/iso, false otherwise - */ - public UpdateISOPermissionsOptions isFeatured(boolean isFeatured) { - this.queryParameters.replaceValues("isfeatured", ImmutableSet.of(isFeatured + "")); - return this; - } - - /** - * @param isPublic true for public template/iso, false for private templates/isos - */ - public UpdateISOPermissionsOptions isPublic(boolean isPublic) { - this.queryParameters.replaceValues("ispublic", ImmutableSet.of(isPublic + "")); - return this; - } - - /** - * @param operation permission operator (add, remove, reset) - */ - public UpdateISOPermissionsOptions operation(PermissionOperation operation) { - this.queryParameters.replaceValues("op", ImmutableSet.of(operation + "")); - return this; - } - - public static class Builder { - - /** - * @param accounts a comma delimited list of accounts. If specified, "op" parameter has to be passed in. - */ - public static UpdateISOPermissionsOptions accounts(Iterable<String> accounts) { - return new UpdateISOPermissionsOptions().accounts(accounts); - } - - /** - * @param isExtractable true if the template/iso is extractable, false other wise. Can be set only by root admin - */ - public static UpdateISOPermissionsOptions isExtractable(boolean isExtractable) { - return new UpdateISOPermissionsOptions().isExtractable(isExtractable); - } - - /** - * @param isFeatured true for featured template/iso, false otherwise - */ - public static UpdateISOPermissionsOptions isFeatured(boolean isFeatured) { - return new UpdateISOPermissionsOptions().isFeatured(isFeatured); - } - - /** - * @param isPublic true for public template/iso, false for private templates/isos - */ - public static UpdateISOPermissionsOptions isPublic(boolean isPublic) { - return new UpdateISOPermissionsOptions().isPublic(isPublic); - } - - /** - * @param operation permission operator (add, remove, reset) - */ - public static UpdateISOPermissionsOptions operation(PermissionOperation operation) { - return new UpdateISOPermissionsOptions().operation(operation); - } - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateLoadBalancerRuleOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateLoadBalancerRuleOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateLoadBalancerRuleOptions.java deleted file mode 100644 index 1caec3a..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateLoadBalancerRuleOptions.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.cloudstack.domain.LoadBalancerRule; -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Options used to control how a load balancer rule is updated - * - * @see <a href= - * "http://download.cloud.com/releases/2.2.0/api_2.2.12/user/updateLoadBalancerRule.html" - * /> - */ -public class UpdateLoadBalancerRuleOptions extends BaseHttpRequestOptions { - - public static final UpdateLoadBalancerRuleOptions NONE = new UpdateLoadBalancerRuleOptions(); - - /** - * @param algorithm load balancer algorithm (source, roundrobin, leastconn) - */ - public UpdateLoadBalancerRuleOptions algorithm(LoadBalancerRule.Algorithm algorithm) { - this.queryParameters.replaceValues("algorithm", ImmutableSet.of(algorithm.toString())); - return this; - } - - /** - * @param description the description of the load balancer rule - */ - public UpdateLoadBalancerRuleOptions description(String description) { - this.queryParameters.replaceValues("description", ImmutableSet.of(description)); - return this; - } - - /** - * @param name the name of the load balancer rule - */ - public UpdateLoadBalancerRuleOptions name(String name) { - this.queryParameters.replaceValues("name", ImmutableSet.of(name)); - return this; - } - - public static class Builder { - - /** - * @see UpdateLoadBalancerRuleOptions#algorithm - */ - public static UpdateLoadBalancerRuleOptions algorithm(LoadBalancerRule.Algorithm algorithm) { - UpdateLoadBalancerRuleOptions options = new UpdateLoadBalancerRuleOptions(); - return options.algorithm(algorithm); - } - - /** - * @see UpdateLoadBalancerRuleOptions#description - */ - public static UpdateLoadBalancerRuleOptions description(String description) { - UpdateLoadBalancerRuleOptions options = new UpdateLoadBalancerRuleOptions(); - return options.description(description); - } - - /** - * @see UpdateLoadBalancerRuleOptions#name - */ - public static UpdateLoadBalancerRuleOptions name(String name) { - UpdateLoadBalancerRuleOptions options = new UpdateLoadBalancerRuleOptions(); - return options.name(name); - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateNetworkOfferingOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateNetworkOfferingOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateNetworkOfferingOptions.java deleted file mode 100644 index 6f0ac87..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateNetworkOfferingOptions.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.cloudstack.domain.NetworkOfferingAvailabilityType; - -import com.google.common.collect.ImmutableSet; - -/** - * Options to control how network offerings are created - * - * @see <a - * href="http://download.cloud.com/releases/2.2.0/api_2.2.12/global_admin/updateNetworkOffering.html" - * /> - */ -public class UpdateNetworkOfferingOptions extends AccountInDomainOptions { - - public static final UpdateNetworkOfferingOptions NONE = new UpdateNetworkOfferingOptions(); - - /** - * @param name - * service offering name - */ - public UpdateNetworkOfferingOptions name(String name) { - this.queryParameters.replaceValues("name", ImmutableSet.<String>of(name)); - return this; - } - - /** - * @param displayText - * service offering display text - */ - public UpdateNetworkOfferingOptions displayText(String displayText) { - this.queryParameters.replaceValues("displaytext", ImmutableSet.<String>of(displayText)); - return this; - } - - /** - * @param availability - * the availability of network offering. Default value is Required for Guest - * Virtual network offering; Optional for Guest Direct network offering - */ - public UpdateNetworkOfferingOptions availability(NetworkOfferingAvailabilityType availability) { - this.queryParameters.replaceValues("availability", ImmutableSet.<String>of(availability.toString())); - return this; - } - - public static class Builder { - - /** - * @see UpdateNetworkOfferingOptions#name - */ - public static UpdateNetworkOfferingOptions name(String name) { - UpdateNetworkOfferingOptions options = new UpdateNetworkOfferingOptions(); - return options.name(name); - } - - /** - * @see UpdateNetworkOfferingOptions#displayText - */ - public static UpdateNetworkOfferingOptions displayText(String displayText) { - UpdateNetworkOfferingOptions options = new UpdateNetworkOfferingOptions(); - return options.displayText(displayText); - } - - /** - * @see UpdateNetworkOfferingOptions#availability - */ - public static UpdateNetworkOfferingOptions availability(NetworkOfferingAvailabilityType availability) { - UpdateNetworkOfferingOptions options = new UpdateNetworkOfferingOptions(); - return options.availability(availability); - } - - /** - * @see UpdateNetworkOfferingOptions#accountInDomain - */ - public static UpdateNetworkOfferingOptions accountInDomain(String account, String domain) { - UpdateNetworkOfferingOptions options = new UpdateNetworkOfferingOptions(); - return options.accountInDomain(account, domain); - } - - /** - * @see UpdateNetworkOfferingOptions#domainId - */ - public static UpdateNetworkOfferingOptions domainId(String domainId) { - UpdateNetworkOfferingOptions options = new UpdateNetworkOfferingOptions(); - return options.domainId(domainId); - } - } - - /** - * {@inheritDoc} - */ - @Override - public UpdateNetworkOfferingOptions accountInDomain(String account, String domain) { - return UpdateNetworkOfferingOptions.class.cast(super.accountInDomain(account, domain)); - } - - /** - * {@inheritDoc} - */ - @Override - public UpdateNetworkOfferingOptions domainId(String domainId) { - return UpdateNetworkOfferingOptions.class.cast(super.domainId(domainId)); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdatePodOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdatePodOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdatePodOptions.java deleted file mode 100644 index ae1f618..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdatePodOptions.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.cloudstack.domain.AllocationState; -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Options to the GlobalPodApi.updatePod API call. - */ -public class UpdatePodOptions extends BaseHttpRequestOptions { - - public static final UpdatePodOptions NONE = new UpdatePodOptions(); - - public static class Builder { - - public static UpdatePodOptions name(String name) { - return new UpdatePodOptions().name(name); - } - - public static UpdatePodOptions startIp(String startIp) { - return new UpdatePodOptions().startIp(startIp); - } - - public static UpdatePodOptions endIp(String endIp) { - return new UpdatePodOptions().endIp(endIp); - } - - public static UpdatePodOptions gateway(String gateway) { - return new UpdatePodOptions().gateway(gateway); - } - - public static UpdatePodOptions netmask(String netmask) { - return new UpdatePodOptions().netmask(netmask); - } - - public static UpdatePodOptions allocationState(AllocationState allocationState) { - return new UpdatePodOptions().allocationState(allocationState); - } - - } - - public UpdatePodOptions name(String name) { - this.queryParameters.replaceValues("name", ImmutableSet.<String>of(name)); - return this; - } - - public UpdatePodOptions startIp(String startIp) { - this.queryParameters.replaceValues("startip", ImmutableSet.<String>of(startIp)); - return this; - } - - public UpdatePodOptions endIp(String endIp) { - this.queryParameters.replaceValues("endip", ImmutableSet.<String>of(endIp)); - return this; - } - - public UpdatePodOptions gateway(String gateway) { - this.queryParameters.replaceValues("gateway", ImmutableSet.<String>of(gateway)); - return this; - } - - public UpdatePodOptions netmask(String netmask) { - this.queryParameters.replaceValues("netmask", ImmutableSet.<String>of(netmask)); - return this; - } - - public UpdatePodOptions allocationState(AllocationState allocationState) { - this.queryParameters.replaceValues("allocationstate", ImmutableSet.of(allocationState.toString())); - return this; - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateServiceOfferingOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateServiceOfferingOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateServiceOfferingOptions.java deleted file mode 100644 index b6d5426..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateServiceOfferingOptions.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import com.google.common.collect.ImmutableSet; - -/** - * Options to control how service offerings are created - * - * @see <a - * href="http://download.cloud.com/releases/2.2.0/api_2.2.12/global_admin/createServiceOffering.html" - * /> - */ -public class UpdateServiceOfferingOptions extends AccountInDomainOptions { - - public static final UpdateServiceOfferingOptions NONE = new UpdateServiceOfferingOptions(); - - /** - * @param name - * service offering name - */ - public UpdateServiceOfferingOptions name(String name) { - this.queryParameters.replaceValues("name", ImmutableSet.<String>of(name)); - return this; - } - - /** - * @param displayText - * service offering display text - */ - public UpdateServiceOfferingOptions displayText(String displayText) { - this.queryParameters.replaceValues("displaytext", ImmutableSet.<String>of(displayText)); - return this; - } - - public static class Builder { - - /** - * @see UpdateServiceOfferingOptions#name - */ - public static UpdateServiceOfferingOptions name(String name) { - UpdateServiceOfferingOptions options = new UpdateServiceOfferingOptions(); - return options.name(name); - } - - /** - * @see UpdateServiceOfferingOptions#displayText - */ - public static UpdateServiceOfferingOptions displayText(String displayText) { - UpdateServiceOfferingOptions options = new UpdateServiceOfferingOptions(); - return options.displayText(displayText); - } - - /** - * @see UpdateServiceOfferingOptions#accountInDomain - */ - public static UpdateServiceOfferingOptions accountInDomain(String account, String domain) { - UpdateServiceOfferingOptions options = new UpdateServiceOfferingOptions(); - return options.accountInDomain(account, domain); - } - - /** - * @see UpdateServiceOfferingOptions#domainId - */ - public static UpdateServiceOfferingOptions domainId(String domainId) { - UpdateServiceOfferingOptions options = new UpdateServiceOfferingOptions(); - return options.domainId(domainId); - } - } - - /** - * {@inheritDoc} - */ - @Override - public UpdateServiceOfferingOptions accountInDomain(String account, String domain) { - return UpdateServiceOfferingOptions.class.cast(super.accountInDomain(account, domain)); - } - - /** - * {@inheritDoc} - */ - @Override - public UpdateServiceOfferingOptions domainId(String domainId) { - return UpdateServiceOfferingOptions.class.cast(super.domainId(domainId)); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateTemplateOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateTemplateOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateTemplateOptions.java deleted file mode 100644 index 4293708..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateTemplateOptions.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.cloudstack.domain.Template; -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Options used to control how a template should be updated. - * - * @see <a - * href="http://download.cloud.com/releases/2.2.8/api/user/updateTemplate.html" - * /> - */ -public class UpdateTemplateOptions extends BaseHttpRequestOptions { - - /** - * true if image is bootable, false otherwise - */ - public UpdateTemplateOptions bootable(boolean bootable) { - this.queryParameters.replaceValues("bootable", ImmutableSet.of(bootable + "")); - return this; - } - - /** - * the display text of the image - */ - public UpdateTemplateOptions displayText(String displayText) { - this.queryParameters.replaceValues("displaytext", ImmutableSet.of(displayText)); - return this; - } - - /** - * the format for the image - */ - public UpdateTemplateOptions format(Template.Format format) { - this.queryParameters.replaceValues("format", ImmutableSet.of(format + "")); - return this; - } - - /** - * the name of the image file - */ - public UpdateTemplateOptions name(String name) { - this.queryParameters.replaceValues("name", ImmutableSet.of(name)); - return this; - } - - /** - * the ID of the OS type that best represents the OS of this image. - */ - public UpdateTemplateOptions osTypeId(String osTypeId) { - this.queryParameters.replaceValues("ostypeid", ImmutableSet.of(osTypeId + "")); - return this; - } - - /** - * true if the image supports the password reset feature; default is false - */ - public UpdateTemplateOptions passwordEnabled(boolean passwordEnabled) { - this.queryParameters.replaceValues("passwordenabled", ImmutableSet.of(passwordEnabled + "")); - return this; - } - - public static class Builder { - - public static UpdateTemplateOptions bootable(boolean bootable) { - UpdateTemplateOptions options = new UpdateTemplateOptions(); - return options.bootable(bootable); - } - - public static UpdateTemplateOptions displayText(String displayText) { - UpdateTemplateOptions options = new UpdateTemplateOptions(); - return options.displayText(displayText); - } - - public static UpdateTemplateOptions format(Template.Format format) { - UpdateTemplateOptions options = new UpdateTemplateOptions(); - return options.format(format); - } - - public static UpdateTemplateOptions name(String name) { - UpdateTemplateOptions options = new UpdateTemplateOptions(); - return options.name(name); - } - - public static UpdateTemplateOptions osTypeId(String osTypeId) { - UpdateTemplateOptions options = new UpdateTemplateOptions(); - return options.osTypeId(osTypeId); - } - - public static UpdateTemplateOptions passwordEnabled(boolean passwordEnabled) { - UpdateTemplateOptions options = new UpdateTemplateOptions(); - return options.passwordEnabled(passwordEnabled); - } - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateTemplatePermissionsOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateTemplatePermissionsOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateTemplatePermissionsOptions.java deleted file mode 100644 index 283edfb..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateTemplatePermissionsOptions.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.base.Joiner; -import com.google.common.collect.ImmutableSet; - -/** - * Options used to control how a template should be updated. - * - * @see <a - * href="http://download.cloud.com/releases/2.2.8/api/user/updateTemplate.html" - * /> - */ -public class UpdateTemplatePermissionsOptions extends BaseHttpRequestOptions { - - /** - * a list of accounts. If specified, "op" parameter has to be passed in. - */ - public UpdateTemplatePermissionsOptions accounts(Iterable<String> accounts) { - this.queryParameters.replaceValues("accounts", ImmutableSet.of(Joiner.on(',').join(accounts))); - return this; - } - - /** - * a list of projects. If specified, "op" parameter has to be passed in. - */ - public UpdateTemplatePermissionsOptions projectIds(Iterable<String> 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 - */ - public UpdateTemplatePermissionsOptions isExtractable(boolean isExtractable) { - this.queryParameters.replaceValues("isextractable", ImmutableSet.of(isExtractable + "")); - return this; - } - - /** - * true for featured template/iso, false otherwise - */ - public UpdateTemplatePermissionsOptions isFeatured(boolean isFeatured) { - this.queryParameters.replaceValues("isfeatured", ImmutableSet.of(isFeatured + "")); - return this; - } - - /** - * true for public template/iso, false for private templates/isos - */ - public UpdateTemplatePermissionsOptions isPublic(boolean isPublic) { - this.queryParameters.replaceValues("ispublic", ImmutableSet.of(isPublic + "")); - return this; - } - - /** - * permission operator (add, remove, reset) - */ - public UpdateTemplatePermissionsOptions op(Operation op) { - this.queryParameters.replaceValues("op", ImmutableSet.of(op + "")); - return this; - } - - public enum Operation { - add, remove, reset - } - - public static class Builder { - - public static UpdateTemplatePermissionsOptions accounts(Iterable<String> accounts) { - UpdateTemplatePermissionsOptions options = new UpdateTemplatePermissionsOptions(); - return options.accounts(accounts); - } - - public static UpdateTemplatePermissionsOptions projectIds(Iterable<String> projectIds) { - UpdateTemplatePermissionsOptions options = new UpdateTemplatePermissionsOptions(); - return options.projectIds(projectIds); - } - - public static UpdateTemplatePermissionsOptions isExtractable(boolean isExtractable) { - UpdateTemplatePermissionsOptions options = new UpdateTemplatePermissionsOptions(); - return options.isExtractable(isExtractable); - } - - public static UpdateTemplatePermissionsOptions isFeatured(boolean isFeatured) { - UpdateTemplatePermissionsOptions options = new UpdateTemplatePermissionsOptions(); - return options.isFeatured(isFeatured); - } - - public static UpdateTemplatePermissionsOptions isPublic(boolean isPublic) { - UpdateTemplatePermissionsOptions options = new UpdateTemplatePermissionsOptions(); - return options.isPublic(isPublic); - } - - public static UpdateTemplatePermissionsOptions op(Operation op) { - UpdateTemplatePermissionsOptions options = new UpdateTemplatePermissionsOptions(); - return options.op(op); - } - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateUserOptions.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateUserOptions.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateUserOptions.java deleted file mode 100644 index dfe16c0..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/options/UpdateUserOptions.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * 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.jclouds.cloudstack.options; - -import org.jclouds.http.options.BaseHttpRequestOptions; - -import com.google.common.collect.ImmutableSet; - -/** - * Optional arguments for updating an User - * - * @see <a - * href="http://download.cloud.com/releases/2.2.0/api_2.2.12/global_admin/updateUser.html" - * /> - */ -public class UpdateUserOptions extends BaseHttpRequestOptions { - - public static final UpdateUserOptions NONE = new UpdateUserOptions(); - - /** - * @param email user email address - */ - public UpdateUserOptions email(String email) { - this.queryParameters.replaceValues("email", ImmutableSet.of(email)); - return this; - } - - /** - * @param firstName user account first name - */ - public UpdateUserOptions firstName(String firstName) { - this.queryParameters.replaceValues("firstname", ImmutableSet.of(firstName)); - return this; - } - - /** - * @param lastName user account last name - */ - public UpdateUserOptions lastName(String lastName) { - this.queryParameters.replaceValues("lastname", ImmutableSet.of(lastName)); - return this; - } - - /** - * @param hashedPassword hashed password (default is MD5). If you wish to use any other - * hashing algorithm, you would need to write a custom authentication adapter - */ - public UpdateUserOptions hashedPassword(String hashedPassword) { - this.queryParameters.replaceValues("password", ImmutableSet.of(hashedPassword)); - return this; - } - - /** - * @param timezone specifies a timezone for this command. For more information on - * the timezone parameter, see Time Zone Format. - */ - public UpdateUserOptions timezone(String timezone) { - this.queryParameters.replaceValues("timezone", ImmutableSet.of(timezone)); - return this; - } - - /** - * @param userApiKey - */ - public UpdateUserOptions userApiKey(String userApiKey) { - this.queryParameters.replaceValues("userapikey", ImmutableSet.of(userApiKey)); - return this; - } - - /** - * @param userSecretKey - */ - public UpdateUserOptions userSecretKey(String userSecretKey) { - this.queryParameters.replaceValues("usersecretkey", ImmutableSet.of(userSecretKey)); - return this; - } - - /** - * @param userName unique user name - */ - public UpdateUserOptions userName(String userName) { - this.queryParameters.replaceValues("username", ImmutableSet.of(userName)); - return this; - } - - public static class Builder { - - /** - * @see UpdateUserOptions#email - */ - public static UpdateUserOptions email(String email) { - UpdateUserOptions options = new UpdateUserOptions(); - return options.email(email); - } - - /** - * @see UpdateUserOptions#firstName - */ - public static UpdateUserOptions firstName(String firstName) { - UpdateUserOptions options = new UpdateUserOptions(); - return options.firstName(firstName); - } - - /** - * @see UpdateUserOptions#lastName - */ - public static UpdateUserOptions lastName(String lastName) { - UpdateUserOptions options = new UpdateUserOptions(); - return options.lastName(lastName); - } - - /** - * @see UpdateUserOptions#hashedPassword - */ - public static UpdateUserOptions hashedPassword(String hashedPassword) { - UpdateUserOptions options = new UpdateUserOptions(); - return options.hashedPassword(hashedPassword); - } - - /** - * @see UpdateUserOptions#timezone - */ - public static UpdateUserOptions timezone(String timezone) { - UpdateUserOptions options = new UpdateUserOptions(); - return options.timezone(timezone); - } - - /** - * @see UpdateUserOptions#userApiKey - */ - public static UpdateUserOptions userApiKey(String userApiKey) { - UpdateUserOptions options = new UpdateUserOptions(); - return options.userApiKey(userApiKey); - } - - /** - * @see UpdateUserOptions#userSecretKey - */ - public static UpdateUserOptions userSecretKey(String userSecretKey) { - UpdateUserOptions options = new UpdateUserOptions(); - return options.userSecretKey(userSecretKey); - } - - /** - * @see UpdateUserOptions#userName - */ - public static UpdateUserOptions userName(String userName) { - UpdateUserOptions options = new UpdateUserOptions(); - return options.userName(userName); - } - } - -}
