Esempio n. 1
0
        /// <summary>
        /// 查询镜像列表(OpenStack原生)
        /// </summary>
        public GlanceListImagesResponse GlanceListImages(GlanceListImagesRequest glanceListImagesRequest)
        {
            Dictionary <string, string> urlParam = new Dictionary <string, string>();
            string              urlPath          = HttpUtils.AddUrlPath("/v2/images", urlParam);
            SdkRequest          request          = HttpUtils.InitSdkRequest(urlPath, "application/json", glanceListImagesRequest);
            HttpResponseMessage response         = DoHttpRequestSync("GET", request);

            return(JsonUtils.DeSerialize <GlanceListImagesResponse>(response));
        }
Esempio n. 2
0
        /// <summary>
        /// 查询镜像列表(OpenStack原生)
        /// </summary>
        public async Task <GlanceListImagesResponse> GlanceListImagesAsync(GlanceListImagesRequest glanceListImagesRequest)
        {
            Dictionary <string, string> urlParam = new Dictionary <string, string>();
            string              urlPath          = HttpUtils.AddUrlPath("/v2/images", urlParam);
            SdkRequest          request          = HttpUtils.InitSdkRequest(urlPath, glanceListImagesRequest);
            HttpResponseMessage response         = await DoHttpRequestAsync("GET", request);

            return(JsonUtils.DeSerialize <GlanceListImagesResponse>(response));
        }