Skip to content

Commit 3457056

Browse files
Merge pull request #19 from diffo-dev/15-nbn-domain
15 nbn domain
2 parents 33e5787 + 04d7fef commit 3457056

41 files changed

Lines changed: 1923 additions & 101 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ config :spark,
3737
]
3838

3939
config :diffo, ash_domains: [Diffo.Provider]
40-
config :diffo_example, ash_domains: [DiffoExample.Access]
40+
config :diffo_example, ash_domains: [DiffoExample.Access, DiffoExample.Nbn]
4141
import_config "#{config_env()}.exs"

lib/access/resources/characteristic_values/cable_value.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,4 @@ defmodule DiffoExample.Access.CableValue do
3030

3131
field :technology, :atom, description: "the cable technology"
3232
end
33-
34-
defimpl String.Chars do
35-
def to_string(struct) do
36-
inspect(struct)
37-
end
38-
end
3933
end

lib/access/resources/characteristic_values/card_value.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,4 @@ defmodule DiffoExample.Access.CardValue do
2828

2929
field :technology, :atom, description: "the card technology"
3030
end
31-
32-
defimpl String.Chars do
33-
def to_string(struct) do
34-
inspect(struct)
35-
end
36-
end
3731
end

lib/access/resources/characteristic_values/float_unit.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,4 @@ defmodule DiffoExample.Access.FloatUnit do
2424

2525
field :unit, :atom, description: "the unit"
2626
end
27-
28-
defimpl String.Chars do
29-
def to_string(struct) do
30-
inspect(struct)
31-
end
32-
end
3327
end

lib/access/resources/characteristic_values/integer_unit.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,4 @@ defmodule DiffoExample.Access.IntegerUnit do
2424

2525
field :unit, :atom, description: "the unit"
2626
end
27-
28-
defimpl String.Chars do
29-
def to_string(struct) do
30-
inspect(struct)
31-
end
32-
end
3327
end

lib/access/resources/characteristic_values/path_value.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,4 @@ defmodule DiffoExample.Access.PathValue do
3333

3434
field :technology, :atom, description: "the path technology"
3535
end
36-
37-
defimpl String.Chars do
38-
def to_string(struct) do
39-
inspect(struct)
40-
end
41-
end
4236
end

lib/access/resources/characteristic_values/shelf_value.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,4 @@ defmodule DiffoExample.Access.ShelfValue do
2828

2929
field :technology, :atom, description: "the shelf technology"
3030
end
31-
32-
defimpl String.Chars do
33-
def to_string(struct) do
34-
inspect(struct)
35-
end
36-
end
3731
end

lib/access/services/characteristic_values/aggregate_interface.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ defmodule DiffoExample.Access.AggregateInterface do
1313
jason do
1414
pick [:name, :physical_interface, :physical_layer, :link_layer, :svlan_id, :vpi]
1515
compact(true)
16+
17+
rename physical_interface: "physicalInterface",
18+
physical_layer: "physicalLayer",
19+
link_layer: "linkLayer",
20+
svlan_id: "svlanId",
21+
vpi: "VPI"
1622
end
1723

1824
outstanding do
@@ -46,10 +52,4 @@ defmodule DiffoExample.Access.AggregateInterface do
4652
default: 0,
4753
description: "the aggregate interface vpi"
4854
end
49-
50-
defimpl String.Chars do
51-
def to_string(struct) do
52-
inspect(struct)
53-
end
54-
end
5555
end

lib/access/services/characteristic_values/bandwidth_profile.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,4 @@ defmodule DiffoExample.Access.BandwidthProfile do
3333
constraints: [one_of: [:kbps, :Mbps]],
3434
description: "the bandwidth profile units"
3535
end
36-
37-
defimpl String.Chars do
38-
def to_string(struct) do
39-
inspect(struct)
40-
end
41-
end
4236
end

lib/access/services/characteristic_values/circuit.ex

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ defmodule DiffoExample.Access.Circuit do
1515
jason do
1616
pick [:circuit_id, :cvlan_id, :vci, :encapsulation, :bandwidth_profile]
1717
compact(true)
18+
rename circuit_id: "circuitId", vci: "VCI", bandwidth_profile: "bandwidthProfile"
1819
end
1920

2021
outstanding do
@@ -41,13 +42,6 @@ defmodule DiffoExample.Access.Circuit do
4142
constraints: [one_of: [:PPPoA, :PPPoE, :IPoE]],
4243
description: "the circuit encapsulation"
4344

44-
field :bandwidth_profile, BandwidthProfile,
45-
description: "the circuit bandwidth profile"
46-
end
47-
48-
defimpl String.Chars do
49-
def to_string(struct) do
50-
inspect(struct)
51-
end
45+
field :bandwidth_profile, BandwidthProfile, description: "the circuit bandwidth profile"
5246
end
5347
end

0 commit comments

Comments
 (0)