public async Task CanCreateFloatingIp()
        {
            var ip1 = new OpenStack.Network.FloatingIp("12345", "172.0.0.1", FloatingIpStatus.Active);

            this.ServicePocoClient.CreateFloatingIpDelegate = (ip) => Task.Factory.StartNew(() => ip1);

            var client = new NetworkServiceClient(GetValidCreds(), "Neutron", CancellationToken.None, this.ServiceLocator);
            var resp   = await client.CreateFloatingIp("12345");

            Assert.IsNotNull(resp);
            Assert.AreEqual(ip1, resp);
        }
        public async Task CanGetFloatingIps()
        {
            var ip1 = new OpenStack.Network.FloatingIp("12345", "172.0.0.1", FloatingIpStatus.Active);
            var ip2 = new OpenStack.Network.FloatingIp("54321", "172.0.0.2", FloatingIpStatus.Down);
            var ips = new List <OpenStack.Network.FloatingIp>()
            {
                ip1, ip2
            };

            this.ServicePocoClient.GetFloatingIpsDelegate = () => Task.Factory.StartNew(() => (IEnumerable <OpenStack.Network.FloatingIp>)ips);

            var client = new NetworkServiceClient(GetValidCreds(), "Neutron", CancellationToken.None, this.ServiceLocator);
            var resp   = await client.GetFloatingIps();

            Assert.IsNotNull(resp);

            var respIps = resp.ToList();

            Assert.AreEqual(2, respIps.Count());
            Assert.AreEqual(ip1, respIps[0]);
            Assert.AreEqual(ip2, respIps[1]);
        }
        public async Task CanGetFloatingIps()
        {
            var ip1 = new OpenStack.Network.FloatingIp("12345", "172.0.0.1", FloatingIpStatus.Active);
            var ip2 = new OpenStack.Network.FloatingIp("54321", "172.0.0.2", FloatingIpStatus.Down);
            var ips = new List<OpenStack.Network.FloatingIp>() { ip1, ip2 };

            this.ServicePocoClient.GetFloatingIpsDelegate = () => Task.Factory.StartNew(() => (IEnumerable<OpenStack.Network.FloatingIp>)ips);

            var client = new NetworkServiceClient(GetValidCreds(), "Neutron", CancellationToken.None, this.ServiceLocator);
            var resp = await client.GetFloatingIps();
            Assert.IsNotNull(resp);

            var respIps = resp.ToList();
            Assert.AreEqual(2, respIps.Count());
            Assert.AreEqual(ip1, respIps[0]);
            Assert.AreEqual(ip2, respIps[1]);
        }
        public async Task CanCreateFloatingIp()
        {
            var ip1 = new OpenStack.Network.FloatingIp("12345", "172.0.0.1", FloatingIpStatus.Active);

            this.ServicePocoClient.CreateFloatingIpDelegate = (ip) => Task.Factory.StartNew(() => ip1);

            var client = new NetworkServiceClient(GetValidCreds(), "Neutron", CancellationToken.None, this.ServiceLocator);
            var resp = await client.CreateFloatingIp("12345");
            Assert.IsNotNull(resp);
            Assert.AreEqual(ip1, resp);
        }