Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
release 1.0.25 code
Browse files Browse the repository at this point in the history
  • Loading branch information
wuchen-huawei committed Aug 31, 2020
1 parent 980a550 commit 8b86cf1
Show file tree
Hide file tree
Showing 46 changed files with 476 additions and 101 deletions.
50 changes: 0 additions & 50 deletions codedex_java.sh

This file was deleted.

2 changes: 1 addition & 1 deletion connectors/http-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>com.huawei.openstack4j.connectors</groupId>
<artifactId>openstack4j-connectors</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<name>OpenStack4j HttpURL Connector</name>
<artifactId>openstack4j-http-connector</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions connectors/http-connector/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
2 changes: 1 addition & 1 deletion connectors/httpclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.huawei.openstack4j.connectors</groupId>
<artifactId>openstack4j-connectors</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openstack4j-httpclient</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions connectors/httpclient/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
2 changes: 1 addition & 1 deletion connectors/jersey2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.huawei.openstack4j.connectors</groupId>
<artifactId>openstack4j-connectors</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openstack4j-jersey2</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions connectors/jersey2/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
2 changes: 1 addition & 1 deletion connectors/okhttp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.huawei.openstack4j.connectors</groupId>
<artifactId>openstack4j-connectors</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openstack4j-okhttp</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions connectors/okhttp/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
2 changes: 1 addition & 1 deletion connectors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.huawei</groupId>
<artifactId>openstack4j-parent</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.huawei.openstack4j.connectors</groupId>
Expand Down
2 changes: 1 addition & 1 deletion connectors/resteasy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.huawei.openstack4j.connectors</groupId>
<artifactId>openstack4j-connectors</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openstack4j-resteasy</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions connectors/resteasy/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
4 changes: 4 additions & 0 deletions connectors/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
2 changes: 1 addition & 1 deletion core-functional-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.huawei</groupId>
<artifactId>openstack4j-parent</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<artifactId>openstack4j-core-functional-test</artifactId>
<name>OpenStack4j Core Functional Test Cases</name>
Expand Down
4 changes: 4 additions & 0 deletions core-functional-test/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
2 changes: 1 addition & 1 deletion core-integration-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.huawei</groupId>
<artifactId>openstack4j-parent</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openstack4j-core-integration-test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.huawei</groupId>
<artifactId>openstack4j-parent</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<artifactId>openstack-core-sample</artifactId>
<name>OpenStack4j Sample</name>
Expand Down
4 changes: 4 additions & 0 deletions core-sample/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
2 changes: 1 addition & 1 deletion core-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.huawei</groupId>
<artifactId>openstack4j-parent</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openstack4j-core-test</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions core-test/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void getVolumeV1() throws Exception {
public void getVolumeV2() throws Exception {
// Check get volume
respondWith("/storage/v2/volume.json");
Volume volume = osv3().blockStorage().volumes().get("8a9287b7-4f4d-4213-8d75-63470f19f27c");
Volume volume = osv3().blockStorage().volumes().get("de3108dd-860c-43bc-a572-42a47f561582");

RecordedRequest getRequest = server.takeRequest();
assertTrue(getRequest.getPath().matches("/v[12]/project-id/volumes/8a9287b7-4f4d-4213-8d75-63470f19f27c"));
Expand Down
1 change: 1 addition & 0 deletions core-test/src/main/resources/storage/v2/volume.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"name": "test-volume",
"replication_status": "disabled",
"consistencygroup_id": null,
"os-vol-mig-status-attr:migstat": "error",
"source_volid": "11111111-1111-1111-1111-111111111111",
"snapshot_id": "22222222-2222-2222-2222-222222222222",
"os-volume-replication:extended_status": null,
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>com.huawei</groupId>
<artifactId>openstack4j-parent</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openstack4j-core</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions core/scalastyle-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">

</checkstyle>
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
import com.huawei.openstack4j.model.compute.actions.LiveMigrateOptions;
import com.huawei.openstack4j.model.compute.actions.RebuildOptions;
import com.huawei.openstack4j.model.compute.builder.ServerCreateBuilder;
import com.huawei.openstack4j.openstack.compute.domain.NovaRemoteConsole;
import com.huawei.openstack4j.openstack.compute.domain.NovaRemoteConsoleResponse;

/**
* Server Operations API
Expand Down Expand Up @@ -259,6 +261,16 @@ public interface ServerService {
*/
String getConsoleOutput(String serverId, int numLines);

/**
* This API is used to obtain the address for remotely logging in to an ECS using VNC.
*
* @param serverId Specifies the ECS ID.
* @param remoteConsole Obtains the address for remotely logging in to an ECS using VNC.
* @param headers Request header
* @return Obtains the address for remotely logging in to an ECS
*/
NovaRemoteConsoleResponse getRemoteConsole(String serverId, NovaRemoteConsole remoteConsole, Map<String, String> headers);

/**
* Obtains the VNC Console connection information for the given server and VNC Console Type
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static Status fromValue(String status) {
}

public enum MigrationStatus {
NONE, MIGRATING
NONE, MIGRATING, SUCCESS, STARTING, DELETING, ERROR
;

@JsonValue
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.huawei.openstack4j.openstack.compute.domain;

import com.fasterxml.jackson.annotation.JsonRootName;
import com.huawei.openstack4j.model.ModelEntity;
import lombok.*;

@Getter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonRootName("remote_console")
public class NovaRemoteConsole implements ModelEntity {

/**
* 远程登录的类型,请将type配置为“novnc”。
*/
private String type;

/**
* 远程登录协议,请将protocol配置为“vnc”。
*/
private String protocol;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.huawei.openstack4j.openstack.compute.domain;

import com.fasterxml.jackson.annotation.JsonRootName;
import com.huawei.openstack4j.model.ModelEntity;
import lombok.*;

@Getter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonRootName("remote_console")
public class NovaRemoteConsoleResponse implements ModelEntity {

/**
* 远程登录的类型
*/
private String type;

/**
* 远程登录协议
*/
private String protocol;

/**
* 远程登录的url。
*
* 该url有效时间10min,超过10min请重新获取。
*/
private String url;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;

import com.huawei.openstack4j.openstack.compute.domain.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -66,20 +67,9 @@
import com.huawei.openstack4j.model.compute.actions.RebuildOptions;
import com.huawei.openstack4j.model.compute.builder.ServerCreateBuilder;
import com.huawei.openstack4j.openstack.common.Metadata;
import com.huawei.openstack4j.openstack.compute.domain.AdminPass;
import com.huawei.openstack4j.openstack.compute.domain.ConsoleOutput;
import com.huawei.openstack4j.openstack.compute.domain.ConsoleOutputOptions;
import com.huawei.openstack4j.openstack.compute.domain.MetadataItem;
import com.huawei.openstack4j.openstack.compute.domain.NovaPassword;
import com.huawei.openstack4j.openstack.compute.domain.NovaServer;
import com.huawei.openstack4j.openstack.compute.domain.NovaServer.Servers;
import com.huawei.openstack4j.openstack.compute.domain.NovaServerCreate;
import com.huawei.openstack4j.openstack.compute.domain.NovaServerUpdate;
import com.huawei.openstack4j.openstack.compute.domain.NovaVNCConsole;
import com.huawei.openstack4j.openstack.compute.domain.NovaVolumeAttachment;
import com.huawei.openstack4j.openstack.compute.domain.actions.BackupAction;
import com.huawei.openstack4j.openstack.compute.domain.actions.BasicActions;
import com.huawei.openstack4j.openstack.compute.domain.actions.BasicActions.ChangePassword;
import com.huawei.openstack4j.openstack.compute.domain.actions.BasicActions.ConfirmResize;
import com.huawei.openstack4j.openstack.compute.domain.actions.BasicActions.Migrate;
import com.huawei.openstack4j.openstack.compute.domain.actions.BasicActions.Reboot;
Expand Down Expand Up @@ -364,6 +354,23 @@ public String getConsoleOutput(String serverId, int numLines) {
return (c != null) ? c.getOutput() : null;
}

/**
* {@inheritDoc}
*/
@Override
public NovaRemoteConsoleResponse getRemoteConsole(String serverId, NovaRemoteConsole remoteConsole, Map<String, String> headers) {
checkNotNull(serverId);
checkNotNull(remoteConsole);
checkNotNull(remoteConsole.getProtocol());
checkNotNull(remoteConsole.getType());
checkNotNull(headers);

return post(NovaRemoteConsoleResponse.class, uri("/servers/%s/remote-consoles", serverId))
.entity(remoteConsole).headers(headers)
.execute();
}


/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.huawei.openstack4j.openstack.ecs.v1.domain;

import com.fasterxml.jackson.annotation.JsonRootName;
import com.huawei.openstack4j.model.ModelEntity;
import lombok.*;

@Getter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonRootName("remote_console")
public class RemoteConsole implements ModelEntity {

/**
* 远程登录的类型,请将type配置为“novnc”。
*/
private String type;

/**
* 远程登录协议,请将protocol配置为“vnc”。
*/
private String protocol;
}
Loading

0 comments on commit 8b86cf1

Please sign in to comment.