SoftLayer OS Reload API

2019-09-10 11:28发布

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条回答
Fickle 薄情
2楼-- · 2019-09-10 12:33

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

查看更多
登录 后发表回答