Prototype added: Switching website shared IP to dedicated and vice versa.
This commit is contained in:
parent
cfb58e3423
commit
2a239006a4
9 changed files with 535 additions and 92 deletions
|
@ -1,59 +1,3 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -80,7 +24,6 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.Web;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
|
@ -124,6 +67,10 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
|
||||
private System.Threading.SendOrPostCallback DeleteWebSiteOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SwitchWebSiteToDedicatedIPOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SwitchWebSiteToSharedIPOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DeleteVirtualDirectoryOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback ChangeSiteStateOperationCompleted;
|
||||
|
@ -306,6 +253,12 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
/// <remarks/>
|
||||
public event DeleteWebSiteCompletedEventHandler DeleteWebSiteCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SwitchWebSiteToDedicatedIPCompletedEventHandler SwitchWebSiteToDedicatedIPCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SwitchWebSiteToSharedIPCompletedEventHandler SwitchWebSiteToSharedIPCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteVirtualDirectoryCompletedEventHandler DeleteVirtualDirectoryCompleted;
|
||||
|
||||
|
@ -1252,6 +1205,91 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SwitchWebSiteToDedicatedIP", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int SwitchWebSiteToDedicatedIP(int siteItemId, int ipAddressId) {
|
||||
object[] results = this.Invoke("SwitchWebSiteToDedicatedIP", new object[] {
|
||||
siteItemId,
|
||||
ipAddressId});
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSwitchWebSiteToDedicatedIP(int siteItemId, int ipAddressId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SwitchWebSiteToDedicatedIP", new object[] {
|
||||
siteItemId,
|
||||
ipAddressId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int EndSwitchWebSiteToDedicatedIP(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SwitchWebSiteToDedicatedIPAsync(int siteItemId, int ipAddressId) {
|
||||
this.SwitchWebSiteToDedicatedIPAsync(siteItemId, ipAddressId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SwitchWebSiteToDedicatedIPAsync(int siteItemId, int ipAddressId, object userState) {
|
||||
if ((this.SwitchWebSiteToDedicatedIPOperationCompleted == null)) {
|
||||
this.SwitchWebSiteToDedicatedIPOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSwitchWebSiteToDedicatedIPOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SwitchWebSiteToDedicatedIP", new object[] {
|
||||
siteItemId,
|
||||
ipAddressId}, this.SwitchWebSiteToDedicatedIPOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSwitchWebSiteToDedicatedIPOperationCompleted(object arg) {
|
||||
if ((this.SwitchWebSiteToDedicatedIPCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SwitchWebSiteToDedicatedIPCompleted(this, new SwitchWebSiteToDedicatedIPCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SwitchWebSiteToSharedIP", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int SwitchWebSiteToSharedIP(int siteItemId) {
|
||||
object[] results = this.Invoke("SwitchWebSiteToSharedIP", new object[] {
|
||||
siteItemId});
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSwitchWebSiteToSharedIP(int siteItemId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SwitchWebSiteToSharedIP", new object[] {
|
||||
siteItemId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int EndSwitchWebSiteToSharedIP(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SwitchWebSiteToSharedIPAsync(int siteItemId) {
|
||||
this.SwitchWebSiteToSharedIPAsync(siteItemId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SwitchWebSiteToSharedIPAsync(int siteItemId, object userState) {
|
||||
if ((this.SwitchWebSiteToSharedIPOperationCompleted == null)) {
|
||||
this.SwitchWebSiteToSharedIPOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSwitchWebSiteToSharedIPOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SwitchWebSiteToSharedIP", new object[] {
|
||||
siteItemId}, this.SwitchWebSiteToSharedIPOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSwitchWebSiteToSharedIPOperationCompleted(object arg) {
|
||||
if ((this.SwitchWebSiteToSharedIPCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SwitchWebSiteToSharedIPCompleted(this, new SwitchWebSiteToSharedIPCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteVirtualDirectory", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int DeleteVirtualDirectory(int siteItemId, string vdirName) {
|
||||
|
@ -4422,6 +4460,58 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void SwitchWebSiteToDedicatedIPCompletedEventHandler(object sender, SwitchWebSiteToDedicatedIPCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SwitchWebSiteToDedicatedIPCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SwitchWebSiteToDedicatedIPCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((int)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void SwitchWebSiteToSharedIPCompletedEventHandler(object sender, SwitchWebSiteToSharedIPCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SwitchWebSiteToSharedIPCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SwitchWebSiteToSharedIPCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((int)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void DeleteVirtualDirectoryCompletedEventHandler(object sender, DeleteVirtualDirectoryCompletedEventArgs e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue