SoftLayer OS重新加载API [英] SoftLayer OS Reload API
问题描述
我与 SL ReloadOS API查询有相同的问题,并且我正在使用maven依赖项.
I have the same issue as SL ReloadOS API inquiry and I am using maven dependency.
<dependency>
<groupId>com.softlayer.api</groupId>
<artifactId>softlayer-api-client</artifactId>
<version>0.2.2</version>
</dependency>
Server.Service serverService = Server.service(client, hardware.getId()); fails to compile with error Type mismatch: cannot convert from Hardware.Service to Server.Service
serverService.reloadOperatingSystem("FORCE", config);
由于我正在使用Maven,
如何更改com.softlayer.api.service.hardware.Server
类的代码?
Since I am using maven,
how to change the code of com.softlayer.api.service.hardware.Server
class?
推荐答案
问题已解决,已在
The issue has been fixed and it was released on master branch of SoftLayer API Client for Java.
问题: https://github.com/softlayer/softlayer-java/issues/21
请按照以下步骤使用master分支:
Follow these steps to use master branch:
- 下载 softlayer-java-master.zip (91kb) 使用git:
- Download the softlayer-java-master.zip(91kb) Using git:
git clone -b master https://github.com/softlayer/softlayer-java.git
打开命令提示符(我想您正在使用Windows),请转到
您解压缩项目并使用
编译项目的路径
maven mvn编译
Open a command prompt (I suppose that you are using Windows), go to
path that you unzipped the project and compile the project using
maven mvn compile
打开项目并尝试运行您拥有的脚本
Open the project and try to run the script that you have
这篇关于SoftLayer OS重新加载API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!