Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,14 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline

<!-- changelog -->

## [v0.0.1](https://github.com/diffo-dev/diffo/compare/v0.0.1..v0.0.1) (2025-10-20)

### Features:
* initial version

## [v0.0.2](https://github.com/diffo-dev/diffo/compare/v0.0.1..v0.0.2) (2025-12-01)
## [v0.2.1](https://github.com/diffo-dev/diffo/compare/v0.2.0..v0.2.1) (2026-05-07)

### Maintenance:
* updated to diffo 0.1.3
* updated to diffo 0.2.1

## [v0.0.3](https://github.com/diffo-dev/diffo/compare/v0.0.2..v0.0.3) (2026-03-13)

### Maintenance:
* updated to diffo 0.1.4, using ash_neo4j 0.2.13 using fork bolty 0.0.7 rather than boltx 0.0.6

## [v0.0.4](https://github.com/diffo-dev/diffo/compare/v0.0.3..v0.0.4) (2026-03-19)

### Fixes:
* fixed relationship enrichment inconsistent across neo4j versions
### Features:
* using transactions and test sandbox
* using improved provider DSL

## [v0.2.0](https://github.com/diffo-dev/diffo/compare/v0.0.4..v0.2.0) (2026-04-26)

Expand All @@ -43,4 +32,25 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
* RSP multi-tenancy: SetRspId change, OwnedByActor and NoActor policy checks, RspOwnership macro shared across RSP-owned resources
* NTD and UNI modelled as NBN-owned infrastructure — readable by any RSP, mutable only by internal calls
* Interactive NBN livebook with Kino RSP selector and actor-scoped provisioning flow
* NBN domain documentation including Perentie ecosystem narrative
* NBN domain documentation including Perentie ecosystem narrative

## [v0.0.4](https://github.com/diffo-dev/diffo/compare/v0.0.3..v0.0.4) (2026-03-19)

### Fixes:
* fixed relationship enrichment inconsistent across neo4j versions

## [v0.0.3](https://github.com/diffo-dev/diffo/compare/v0.0.2..v0.0.3) (2026-03-13)

### Maintenance:
* updated to diffo 0.1.4, using ash_neo4j 0.2.13 using fork bolty 0.0.7 rather than boltx 0.0.6

## [v0.0.2](https://github.com/diffo-dev/diffo/compare/v0.0.1..v0.0.2) (2025-12-01)

### Maintenance:
* updated to diffo 0.1.3

## [v0.0.1](https://github.com/diffo-dev/diffo/compare/v0.0.1..v0.0.1) (2025-10-20)

### Features:
* initial version

5 changes: 2 additions & 3 deletions documentation/domains/diffo_example_nbn.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ SPDX-License-Identifier: MIT
```elixir
Mix.install(
[
# {:diffo_example, "~> 0.3.0"},
{:diffo_example, github: "diffo-dev/diffo_example", branch: "dev"},
{:diffo, github: "diffo-dev/diffo", branch: "dev", override: true},
{:diffo_example, "~> 0.2.1"},
{:diffo, "~> 0.4.1"},
{:kino, "~> 0.14"},
{:req, "~> 0.5"}
],
Expand Down
14 changes: 8 additions & 6 deletions lib/diffo_example/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ defmodule DiffoExample.Application do
@impl true
def start(_type, _args) do
children =
[
{Task, &DiffoExample.Nbn.Initializer.init/0}
] ++
if Mix.env() == :test,
do: [],
else: [{Plug.Cowboy, scheme: :http, plug: DiffoExample.Nbn.Router, options: [port: 4000]}]
if Mix.env() == :test do
[]
else
[
{Task, &DiffoExample.Nbn.Initializer.init/0},
{Plug.Cowboy, scheme: :http, plug: DiffoExample.Nbn.Router, options: [port: 4000]}
]
end

Supervisor.start_link(children, strategy: :one_for_one, name: DiffoExample.Supervisor)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/nbn/initializer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule DiffoExample.Nbn.Initializer do
%{name: "Taipan Group", short_name: :taipan, id: "0004"},
%{name: "Echidna Networks", short_name: :echidna, id: "0005"},
%{name: "Dugong Digital", short_name: :dugong, id: "0006"},
%{name: "Lyrebird", short_name: :lyrebird, id: "0007"}
#%{name: "Lyrebird", short_name: :lyrebird, id: "0007"}
]

def init do
Expand Down
9 changes: 5 additions & 4 deletions lib/nbn/resources/rsp.ex
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ defmodule DiffoExample.Nbn.Rsp do

instances do
role :owner, DiffoExample.Nbn.Avc
role :owner, DiffoExample.Nbn.Cvc
role :owner, DiffoExample.Nbn.Nni
role :owner, DiffoExample.Nbn.NniGroup
role :owner, DiffoExample.Nbn.NbnEthernet
# pending resolution of /diffo-dev/diffo#101
#role :owner, DiffoExample.Nbn.Cvc
#role :owner, DiffoExample.Nbn.Nni
#role :owner, DiffoExample.Nbn.NniGroup
#role :owner, DiffoExample.Nbn.NbnEthernet
end

actions do
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule DiffoExample.MixProject do
@moduledoc false
use Mix.Project

@version "0.2.0"
@version "0.2.1"
@name "DiffoExample"
@description "Examples for Diffo TMF Service and Resource Manager"
@github_url "https://github.com/diffo-dev/diffo-example"
Expand Down Expand Up @@ -86,7 +86,7 @@ defmodule DiffoExample.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:diffo, diffo_version([path: "../diffo"])},
{:diffo, diffo_version("~> 0.2.1")},
{:ash_json_api, "~> 1.6"},
{:plug_cowboy, "~> 2.7"},
{:req, "~> 0.5", only: [:dev, :test]},
Expand Down
18 changes: 9 additions & 9 deletions mix.lock

Large diffs are not rendered by default.

11 changes: 3 additions & 8 deletions test/access/cable_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

defmodule DiffoExample.Access.CableTest do
@moduledoc false
use ExUnit.Case
use ExUnit.Case, async: true
alias Diffo.Provider.Specification
alias Diffo.Provider.Characteristic
alias Diffo.Provider.Assignment
Expand All @@ -13,14 +13,9 @@ defmodule DiffoExample.Access.CableTest do
alias DiffoExample.Access.IntegerUnit
alias DiffoExample.Test.Characteristics

setup_all do
AshNeo4j.BoltyHelper.start()
end

setup do
on_exit(fn ->
AshNeo4j.Neo4jHelper.delete_all()
end)
AshNeo4j.Sandbox.checkout()
on_exit(&AshNeo4j.Sandbox.rollback/0)
end

describe "build cable" do
Expand Down
11 changes: 3 additions & 8 deletions test/access/card_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,17 @@

defmodule DiffoExample.Access.CardTest do
@moduledoc false
use ExUnit.Case
use ExUnit.Case, async: true
alias Diffo.Provider.Specification
alias Diffo.Provider.Characteristic
alias Diffo.Provider.Assignment
alias DiffoExample.Access
alias DiffoExample.Access.Card
alias DiffoExample.Test.Characteristics

setup_all do
AshNeo4j.BoltyHelper.start()
end

setup do
on_exit(fn ->
AshNeo4j.Neo4jHelper.delete_all()
end)
AshNeo4j.Sandbox.checkout()
on_exit(&AshNeo4j.Sandbox.rollback/0)
end

describe "build card" do
Expand Down
11 changes: 3 additions & 8 deletions test/access/characteristic_value_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,17 @@

defmodule DiffoExample.Access.CharacteristicValueTest do
@moduledoc false
use ExUnit.Case
use ExUnit.Case, async: true
alias DiffoExample.Access.AggregateInterface
alias DiffoExample.Access.Circuit
alias DiffoExample.Access.Dslam
alias DiffoExample.Access.Line
alias DiffoExample.Access.BandwidthProfile
alias Diffo.Type.Value

setup_all do
AshNeo4j.BoltyHelper.start()
end

setup do
on_exit(fn ->
AshNeo4j.Neo4jHelper.delete_all()
end)
AshNeo4j.Sandbox.checkout()
on_exit(&AshNeo4j.Sandbox.rollback/0)
end

@dslam "QDONC0001"
Expand Down
11 changes: 3 additions & 8 deletions test/access/dsl_access_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

defmodule DiffoExample.Access.DslAccessTest do
@moduledoc false
use ExUnit.Case
use ExUnit.Case, async: true
alias Diffo.Provider
alias Diffo.Provider.Specification
alias Diffo.Provider.Feature
Expand All @@ -16,14 +16,9 @@ defmodule DiffoExample.Access.DslAccessTest do
alias DiffoExample.Test.Parties
alias DiffoExample.Test.Places

setup_all do
AshNeo4j.BoltyHelper.start()
end

setup do
on_exit(fn ->
AshNeo4j.Neo4jHelper.delete_all()
end)
AshNeo4j.Sandbox.checkout()
on_exit(&AshNeo4j.Sandbox.rollback/0)
end

describe "service qualification" do
Expand Down
11 changes: 3 additions & 8 deletions test/access/path_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

defmodule DiffoExample.Access.PathTest do
@moduledoc false
use ExUnit.Case
use ExUnit.Case, async: true
alias Diffo.Provider
alias Diffo.Provider.Specification
alias Diffo.Provider.Characteristic
Expand All @@ -17,14 +17,9 @@ defmodule DiffoExample.Access.PathTest do
alias DiffoExample.Test.Parties
alias DiffoExample.Test.Places

setup_all do
AshNeo4j.BoltyHelper.start()
end

setup do
on_exit(fn ->
AshNeo4j.Neo4jHelper.delete_all()
end)
AshNeo4j.Sandbox.checkout()
on_exit(&AshNeo4j.Sandbox.rollback/0)
end

describe "build path" do
Expand Down
11 changes: 3 additions & 8 deletions test/access/shelf_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

defmodule DiffoExample.Access.ShelfTest do
@moduledoc false
use ExUnit.Case
use ExUnit.Case, async: true
alias Diffo.Provider
alias Diffo.Provider.Specification
alias Diffo.Provider.Characteristic
Expand All @@ -18,14 +18,9 @@ defmodule DiffoExample.Access.ShelfTest do
alias DiffoExample.Test.Parties
alias DiffoExample.Test.Places

setup_all do
AshNeo4j.BoltyHelper.start()
end

setup do
on_exit(fn ->
AshNeo4j.Neo4jHelper.delete_all()
end)
AshNeo4j.Sandbox.checkout()
on_exit(&AshNeo4j.Sandbox.rollback/0)
end

describe "build shelf" do
Expand Down
2 changes: 1 addition & 1 deletion test/diffo_example_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

defmodule DiffoExampleTest do
@moduledoc false
use ExUnit.Case
use ExUnit.Case, async: true
doctest DiffoExample.Access.Util
doctest DiffoExample.Nbn.Util
doctest DiffoExample.Nbn.Speeds
Expand Down
11 changes: 3 additions & 8 deletions test/nbn/nbn_ethernet_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

defmodule DiffoExample.Nbn.NbnEthernetTest do
@moduledoc false
use ExUnit.Case
use ExUnit.Case, async: true
alias Diffo.Provider.Specification
alias Diffo.Provider.Characteristic
alias DiffoExample.Nbn
Expand All @@ -19,14 +19,9 @@ defmodule DiffoExample.Nbn.NbnEthernetTest do
alias Diffo.Provider.Assignment
alias Diffo.Provider.Instance.Relationship

setup_all do
AshNeo4j.BoltyHelper.start()
end

setup do
on_exit(fn ->
AshNeo4j.Neo4jHelper.delete_all()
end)
AshNeo4j.Sandbox.checkout()
on_exit(&AshNeo4j.Sandbox.rollback/0)
end

describe "build nbn_ethernet" do
Expand Down
11 changes: 3 additions & 8 deletions test/nbn/rsp_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@

defmodule DiffoExample.Nbn.RspTest do
@moduledoc false
use ExUnit.Case
use ExUnit.Case, async: true, async: true
alias DiffoExample.Nbn
alias DiffoExample.Nbn.Rsp

setup_all do
AshNeo4j.BoltyHelper.start()
end

setup do
on_exit(fn ->
AshNeo4j.Neo4jHelper.delete_all()
end)
AshNeo4j.Sandbox.checkout()
on_exit(&AshNeo4j.Sandbox.rollback/0)
end

defp create_rsp(attrs) do
Expand Down
3 changes: 2 additions & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# SPDX-License-Identifier: MIT

Mix.Task.run("app.start")
ExUnit.start()
level = Application.get_env(:logger, :console) |> Keyword.get(:level)
Logger.put_application_level(:diffo, level)
Logger.put_application_level(:ash_neo4j, :error)
AshNeo4j.Neo4jHelper.delete_all()
ExUnit.start()
Loading