add some more stub's
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/44e3e5eb Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/44e3e5eb Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/44e3e5eb Branch: refs/heads/gslb Commit: 44e3e5ebe0d0a55c0e7d103515e2397ca7bd0366 Parents: 02b1653 Author: Murali Reddy <[email protected]> Authored: Fri Feb 8 17:25:01 2013 +0530 Committer: Murali Reddy <[email protected]> Committed: Fri Feb 8 17:25:01 2013 +0530 ---------------------------------------------------------------------- .../routing/GlobalLoadBalancerConfigAnswer.java | 26 ++++ .../routing/GlobalLoadBalancerConfigCommand.java | 25 ++++ .../cloud/network/resource/NetscalerResource.java | 98 +++++++++++++++ 3 files changed, 149 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/44e3e5eb/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigAnswer.java b/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigAnswer.java new file mode 100644 index 0000000..dbf57aa --- /dev/null +++ b/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigAnswer.java @@ -0,0 +1,26 @@ +// 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 com.cloud.agent.api.routing; + +import com.cloud.agent.api.Answer; + +public class GlobalLoadBalancerConfigAnswer extends Answer{ + + protected GlobalLoadBalancerConfigAnswer() { + super(); + } +} http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/44e3e5eb/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java b/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java new file mode 100644 index 0000000..ac18d2c --- /dev/null +++ b/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java @@ -0,0 +1,25 @@ +// 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 com.cloud.agent.api.routing; + +/** + * GlobalLoadBalancerConfigCommand used for sending the GSLB configuration to GSLB service provider + */ +public class GlobalLoadBalancerConfigCommand extends NetworkElementCommand { + +} http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/44e3e5eb/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java ---------------------------------------------------------------------- diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java index abea464..ae79d9e 100644 --- a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java +++ b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java @@ -14,6 +14,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. + package com.cloud.network.resource; import java.util.Formatter; @@ -396,6 +397,8 @@ public class NetscalerResource implements ServerResource { return execute((DestroyLoadBalancerApplianceCommand) cmd, numRetries); } else if (cmd instanceof SetStaticNatRulesCommand) { return execute((SetStaticNatRulesCommand) cmd, numRetries); + } else if (cmd instanceof GlobalLoadBalancerConfigCommand) { + return execute((GlobalLoadBalancerConfigCommand) cmd, numRetries); } else { return Answer.createUnsupportedCommandAnswer(cmd); } @@ -787,6 +790,101 @@ public class NetscalerResource implements ServerResource { } } + private void execute(GlobalLoadBalancerConfigCommand cmd, numRetries) { + /* + * 1. domain name for which NetScale will act as authoritative DNS server + * 2. DNS record type + * 3. service type, virtual server name + * 4. Configure GSLB method + * 5. Configure Persistence + * 6. + */ + return new GlobalLoadBalancerConfigAnswer(); + } + + /* + * convineance class for GSLB functionality that includes methods to + * - create, delete, update, get the GSLB sites + * - create, delete, update, get the GSLB services + * - create, delete, update, get the GSLB virtual servers + * - create, delete GSLB virtual server and GSLB service bindings + */ + private static class GSLB { + + private void createSite() { + + } + + private void deleteSite() { + + } + + private gslbsite getSite() { + + } + + private boolean checkSiteExists() { + return true; + } + + private void createService() { + + } + + private void deleteService() { + + } + + private void getService() { + + } + + private boolean checkServiceExists() { + return true; + } + + private void createVirtualServer() { + + } + + private void deleteVirtualServer() { + + } + + private void enableVirtualServer() { + + } + + private void disableVirtualServer() { + + } + + private void createVserverServiceBinding() { + + } + + private void deleteVserverServiceBinding() { + + } + + private void updateVserverServiceBinding() { + + } + + private void createVserverDomainBinding() { + + } + + private void deleteVserverDomainBinding() { + + } + + private void updateVserverDomainBinding() { + + } + } + + private void enableVPXInterfaces(String publicIf, String privateIf, ns ns_obj) { // enable VPX to use 10 gigabit Ethernet interfaces if public/private interface // on SDX is a 10Gig interface
