Skip to content

Commit

Permalink
Merge branch 'add-network-id' into 'master'
Browse files Browse the repository at this point in the history
Add "networkId" field into network interface

See merge request !15
  • Loading branch information
tomskikh committed Oct 5, 2018
2 parents 0c98837 + 51a29c6 commit 4942960
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import spray.json.DefaultJsonProtocol._
import spray.json.RootJsonFormat

final case class NetworkInterface(id: UUID,
networkId: UUID,
secondaryIps: Seq[SecondaryIp])


Expand All @@ -34,6 +35,7 @@ object NetworkInterface {
jsonFormat(
NetworkInterface.apply,
"id",
"networkid",
"secondaryip"
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ import com.bwsw.cloudstack.entities.responses.common.Entity
import com.fasterxml.jackson.annotation.JsonProperty

final case class NetworkInterface(id: UUID,
@JsonProperty("networkid") networkId: UUID,
@JsonProperty("secondaryip") secondaryIps: Seq[SecondaryIp])
extends Entity
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,12 @@ class DefaultJsonFormatsTests
networkInterfaces = Seq(
NetworkInterface(
id = UUID.fromString("674aeb81-c153-4b39-b462-85d47c304efc"),
networkId = UUID.fromString("95b8b9cf-fd93-4601-b037-915b2bf5d5a2"),
secondaryIps = Seq.empty
),
NetworkInterface(
id = UUID.fromString("ace7cb25-6b7a-4315-b519-59d1fde5666f"),
networkId = UUID.fromString("a72d1fb8-c754-42f2-8bad-295084c4f981"),
secondaryIps = Seq.empty
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ class JsonFormatsTests
networkInterfaces = Seq(
NetworkInterface(
id = UUID.fromString("674aeb81-c153-4b39-b462-85d47c304efc"),
networkId = UUID.fromString("95b8b9cf-fd93-4601-b037-915b2bf5d5a2"),
secondaryIps = Seq.empty
),
NetworkInterface(
id = UUID.fromString("ace7cb25-6b7a-4315-b519-59d1fde5666f"),
networkId = UUID.fromString("a72d1fb8-c754-42f2-8bad-295084c4f981"),
secondaryIps = Seq.empty
)
),
Expand Down

0 comments on commit 4942960

Please sign in to comment.