internal IHttpResponseAbstraction HandleCreateFloatingIp()
        {
            var payloadFixture = @"{{
                ""floatingip"": {0}
            }}";

            var ip = new FloatingIp(Guid.NewGuid().ToString(), "172.0.0." + (this.FloatingIps.Count + 1), FloatingIpStatus.Active);

            this.FloatingIps.Add(ip);
            var floatIpContent = string.Format(payloadFixture, GenerateFloatingIpPayload(ip)).ConvertToStream();

            return(TestHelper.CreateResponse(HttpStatusCode.Created, new Dictionary <string, string>(), floatIpContent));
        }
        private string GenerateFloatingIpPayload(FloatingIp floatingIp)
        {
            var payloadFixture = @"{{
                    ""router_id"": ""fafac59b-a94a-4525-8700-f4f448e0ac97"",
                    ""status"": ""{1}"",
                    ""tenant_id"": ""ffe683d1060449d09dac0bf9d7a371cd"",
                    ""floating_network_id"": ""3eaab3f7-d3f2-430f-aa73-d07f39aae8f4"",
                    ""fixed_ip_address"": ""10.0.0.2"",
                    ""floating_ip_address"": ""{2}"",
                    ""port_id"": ""9da94672-6e6b-446c-9579-3dd5484b31fd"",
                    ""id"": ""{0}""
                }}";

            return(string.Format(payloadFixture, floatingIp.Id, floatingIp.Status.ToString().ToUpper(), floatingIp.FloatingIpAddress));
        }