SoftLayer OS Reload API

被刻印的时光 ゝ 提交于 2020-01-25 20:40:09

问题


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);

Since I am using maven, how to change the code of com.softlayer.api.service.hardware.Server class?


回答1:


The issue has been fixed and it was released on master branch of SoftLayer API Client for Java.

Issue: https://github.com/softlayer/softlayer-java/issues/21

Follow these steps to use master branch:

  1. Download the softlayer-java-master.zip(91kb) Using git:

    git clone -b master https://github.com/softlayer/softlayer-java.git

  2. 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

  3. Open the project and try to run the script that you have



来源:https://stackoverflow.com/questions/38381633/softlayer-os-reload-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!