protected override void ProcessRecord() { nitro_service nitroService = new nitro_service(this.IPAddress, !(bool)this.UseSSL ? "HTTP" : "HTTPS"); if (!(nitroService.login(this.Credential.UserName, this.Credential.GetNetworkCredential().Password).sessionid != "")) return; if ((uint)lbvserver.add(nitroService, new lbvserver() { port = new ushort?((ushort)80), ipv46 = this.VIPAddress, name = this.Name, servicetype = "HTTP" }).errorcode <= 0U) { lbvserver _lbvserver = lbvserver.get(nitroService, this.Name); if (_lbvserver != null) { NSVirtualServer nsVirtualServer = new NSVirtualServer() { Name = _lbvserver.name, IP = _lbvserver.ipv46, IPMask = _lbvserver.ipmask, IPPattern = _lbvserver.ippattern, ServiceType = _lbvserver.servicetype, Type = _lbvserver.type }; nitroService.save_config(); this.WriteObject((object)nsVirtualServer); } } }
protected override void ProcessRecord() { nitro_service nitroService = new nitro_service(this.IPAddress, !(bool)this.UseSSL ? "HTTP" : "HTTPS"); if (!(nitroService.login(this.Credential.UserName, this.Credential.GetNetworkCredential().Password).sessionid != "")) { return; } if ((uint)lbvserver.add(nitroService, new lbvserver() { port = new ushort?((ushort)80), ipv46 = this.VIPAddress, name = this.Name, servicetype = "HTTP" }).errorcode <= 0U) { lbvserver _lbvserver = lbvserver.get(nitroService, this.Name); if (_lbvserver != null) { NSVirtualServer nsVirtualServer = new NSVirtualServer() { Name = _lbvserver.name, IP = _lbvserver.ipv46, IPMask = _lbvserver.ipmask, IPPattern = _lbvserver.ippattern, ServiceType = _lbvserver.servicetype, Type = _lbvserver.type }; nitroService.save_config(); this.WriteObject((object)nsVirtualServer); } } }
protected override void ProcessRecord() { nitro_service service = new nitro_service(this.IPAddress, !(bool)this.UseSSL ? "HTTP" : "HTTPS"); if (!(service.login(this.Credential.UserName, this.Credential.GetNetworkCredential().Password).sessionid != "")) { return; } List <NSVirtualServer> list = new List <NSVirtualServer>(); foreach (lbvserver _lbvserver in lbvserver.get(service)) { NSVirtualServer nsVirtualServer = new NSVirtualServer() { Name = _lbvserver.name, IP = _lbvserver.ipv46, IPMask = _lbvserver.ipmask, IPPattern = _lbvserver.ippattern, ServiceType = _lbvserver.servicetype, Type = _lbvserver.type }; list.Add(nsVirtualServer); } this.WriteObject((object)list); }
protected override void ProcessRecord() { nitro_service service = new nitro_service(this.IPAddress, !(bool)this.UseSSL ? "HTTP" : "HTTPS"); if (!(service.login(this.Credential.UserName, this.Credential.GetNetworkCredential().Password).sessionid != "")) return; List<NSVirtualServer> list = new List<NSVirtualServer>(); foreach (lbvserver _lbvserver in lbvserver.get(service)) { NSVirtualServer nsVirtualServer = new NSVirtualServer() { Name = _lbvserver.name, IP = _lbvserver.ipv46, IPMask = _lbvserver.ipmask, IPPattern = _lbvserver.ippattern, ServiceType = _lbvserver.servicetype, Type = _lbvserver.type }; list.Add(nsVirtualServer); } this.WriteObject((object)list); }