public Instance CreateInstance(string instanceName, string imageId, string keypairName, string flavorId, Identity identity)
        {
            RequestManager requestManager = new RequestManager(identity);
            var            uri            = string.Format("/servers");

            var bodyObject = new InstanceRequestBodyWrapper()
            {
                server = new InstanceRequestBody()
                {
                    name      = instanceName,
                    imageRef  = imageId,
                    key_name  = keypairName,
                    flavorRef = flavorId,
                }
            };

            System.Web.Script.Serialization.JavaScriptSerializer oSerializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            string  body     = oSerializer.Serialize(bodyObject);
            JObject response = requestManager.Post(uri, body, "nova");


            if (response != null)
            {
                var tempinstance = response["server"];
                var instance     = new Instance()
                {
                    Id = tempinstance["id"].ToString(),
                };

                return(instance);
            }
            return(null);
        }
        public Instance CreateInstance(string instanceName, string imageId, string keypairName, string flavorId, Identity identity)
        {
            RequestManager requestManager = new RequestManager(identity);
            var uri = string.Format("/servers");

            var bodyObject = new InstanceRequestBodyWrapper()
            {
                server = new InstanceRequestBody()
                {
                    name = instanceName,
                    imageRef = imageId,
                    key_name = keypairName,
                    flavorRef = flavorId,
                }
            };
            System.Web.Script.Serialization.JavaScriptSerializer oSerializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            string body = oSerializer.Serialize(bodyObject);
            JObject response = requestManager.Post(uri, body, "nova");

            if (response != null)
            {
                var tempinstance = response["server"];
                var instance = new Instance()
                {
                    Id = tempinstance["id"].ToString(),
                };

                return instance;
            }
            return null;
        }