如何使用Softlayer REST API使用Flex映像重新加载系统 [英] How to reload system with flex image using softlayer REST API

查看:28
本文介绍了如何使用Softlayer REST API使用Flex映像重新加载系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用下面的flex映像重新加载裸机系统,但是它不能持久存在.REST调用是我做错的吗?

I'm trying to reload a bare metal system with the following flex image but it isn't persisting. Is there something I'm doing wrong is the REST call?

    String content = "{\"parameters\":[\"FORCE\",{\"sshKeyIds\":["+sshKeys+"]},{\"imageTemplateId\":803303}]}";

    Response response = RestAssured.given().contentType(ContentType.JSON).body(content).post("https://"+username+":"+apikey+"@api.softlayer.com/rest/v3/SoftLayer_Hardware_Server/"+softlayer_id+"/reloadOperatingSystem.json");

推荐答案

请使用

•但是,如何获取上述配置的令牌?

• But, How to get the token for our above configuration?

执行:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Hardware_Server/[Hardware_Id]/reloadOperatingSystem

Method: GET

这篇关于如何使用Softlayer REST API使用Flex映像重新加载系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆