File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed
keystone-model/src/main/java/com/woorea/openstack/keystone/model
nova-client/src/main/java/com/woorea/openstack/nova/api
openstack-client-connectors/resteasy-connector/src/main/java/com/woorea/openstack/connector Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public class User implements Serializable {
1212
1313 private String username ;
1414
15- @ JsonProperty ("OS_KSADM_password " )
15+ @ JsonProperty ("OS-KSADM:password " )
1616 private String password ;
1717
1818 private String tenantId ;
Original file line number Diff line number Diff line change @@ -230,15 +230,13 @@ public ReverResizeAction(String id) {
230230
231231 }
232232
233- public class CreateImageAction extends Action <Server > {
233+ public class CreateImageAction extends Action <Void > {
234234
235- private CreateImage action ;
235+ public CreateImageAction (String id , CreateImage createImage ) {
236+ super (id , Entity .json (createImage ), Void .class );
237+ }
236238
237- public CreateImageAction (String id ) {
238- super (id , Entity .json (new CreateImage ()), Server .class );
239- }
240-
241- }
239+ }
242240
243241 public class StartServer extends OpenStackRequest <Void > {
244242
@@ -264,6 +262,10 @@ public StopServer(String id) {
264262
265263 }
266264
265+ public CreateImageAction createImage (String id , CreateImage createImage ) {
266+ return new CreateImageAction (id , createImage );
267+ }
268+
267269 public StartServer start (String id ) {
268270 return new StartServer (id );
269271 }
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ public ObjectMapper getContext(Class<?> type) {
6363 DEFAULT_MAPPER .setSerializationInclusion (Inclusion .NON_NULL );
6464 DEFAULT_MAPPER .enable (SerializationConfig .Feature .INDENT_OUTPUT );
6565 DEFAULT_MAPPER .enable (DeserializationConfig .Feature .ACCEPT_SINGLE_VALUE_AS_ARRAY );
66+ DEFAULT_MAPPER .disable (DeserializationConfig .Feature .FAIL_ON_UNKNOWN_PROPERTIES );
6667
6768 WRAPPED_MAPPER = new ObjectMapper ();
6869
@@ -71,6 +72,7 @@ public ObjectMapper getContext(Class<?> type) {
7172 WRAPPED_MAPPER .enable (SerializationConfig .Feature .WRAP_ROOT_VALUE );
7273 WRAPPED_MAPPER .enable (DeserializationConfig .Feature .UNWRAP_ROOT_VALUE );
7374 WRAPPED_MAPPER .enable (DeserializationConfig .Feature .ACCEPT_SINGLE_VALUE_AS_ARRAY );
75+ WRAPPED_MAPPER .disable (DeserializationConfig .Feature .FAIL_ON_UNKNOWN_PROPERTIES );
7476
7577 providerFactory = new OpenStackProviderFactory ();
7678 }
@@ -107,7 +109,8 @@ public <T> OpenStackResponse request(OpenStackRequest<T> request) {
107109
108110 if (response .getStatus () == HttpStatus .SC_OK
109111 || response .getStatus () == HttpStatus .SC_CREATED
110- || response .getStatus () == HttpStatus .SC_NO_CONTENT ) {
112+ || response .getStatus () == HttpStatus .SC_NO_CONTENT
113+ || response .getStatus () == HttpStatus .SC_ACCEPTED ) {
111114 return new RESTEasyResponse (client , response );
112115 }
113116
You can’t perform that action at this time.
0 commit comments