Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Commit c95b907

Browse files
authored
[PE-334] Add ability to set a fixed IP on a network port. (#5)
1 parent 4475be5 commit c95b907

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

core/src/main/java/org/openstack4j/openstack/compute/domain/NovaServerCreate.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ public ServerCreateConcreteBuilder networks(List<String> idList) {
260260
return this;
261261
}
262262

263+
public ServerCreateConcreteBuilder addNetwork(String id, String fixedIP) {
264+
m.addNetwork(id, fixedIP);
265+
return this;
266+
}
267+
263268
@Override
264269
public ServerCreateBuilder addNetworkPort(String portId) {
265270
m.addNetworkPort(portId);

core/src/main/java/org/openstack4j/openstack/networking/domain/NeutronQoSPolicy.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.openstack4j.openstack.networking.domain;
22

33
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import com.fasterxml.jackson.annotation.JsonSubTypes;
5+
import com.fasterxml.jackson.annotation.JsonTypeInfo;
46
import org.openstack4j.model.common.builder.ResourceBuilder;
57
import org.openstack4j.model.network.QoSPolicy;
68
import org.openstack4j.model.network.builder.QoSPolicyBuilder;
@@ -30,6 +32,17 @@ public class NeutronQoSPolicy implements QoSPolicy {
3032
@JsonProperty("is_default")
3133
private boolean isDefault;
3234

35+
@JsonTypeInfo(
36+
use = JsonTypeInfo.Id.NAME,
37+
include = JsonTypeInfo.As.PROPERTY,
38+
property = "type"
39+
)
40+
@JsonSubTypes({
41+
@JsonSubTypes.Type(value = NeutronBandwidthLimitRule.class, name = "bandwidth_limit"),
42+
@JsonSubTypes.Type(value = NeutronDscpMarkingRule.class, name = "dscp_marking"),
43+
@JsonSubTypes.Type(value = NeutronMinimumBandwidthRule.class, name = "minimum_bandwidth"),
44+
})
45+
@JsonProperty("rules")
3346
private List<? extends Rule> rules;
3447

3548
@JsonProperty("created_at")

0 commit comments

Comments
 (0)