Skip to content

Commit 724e267

Browse files
committed
bolty
1 parent 96cbf01 commit 724e267

16 files changed

Lines changed: 107 additions & 60 deletions

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
erlang 28.1
2-
elixir 1.19.4-otp-28
1+
erlang 28.3.1
2+
elixir 1.19.5-otp-28

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
1919
## [v0.0.2](https://github.com/diffo-dev/diffo/compare/v0.0.1..v0.0.2) (2025-12-01)
2020

2121
### Maintenance:
22-
* update to diffo 0.1.3
22+
* updated to diffo 0.1.3
23+
24+
## [v0.0.3](https://github.com/diffo-dev/diffo/compare/v0.0.1..v0.0.2) (2026-03-13)
25+
26+
### Maintenance:
27+
* updated to diffo 0.1.4, using ash_neo4j 0.2.13 using fork bolty 0.0.7 rather than boltx 0.0.6

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SPDX-FileCopyrightText: 2025 diffo_example contributors <https://github.com/diff
44
SPDX-License-Identifier: MIT
55
-->
66

7-
# Diffo Examples
7+
# Diffo Example
88

99
[![Module Version](https://img.shields.io/hexpm/v/diffo)](https://hex.pm/packages/diffo_example)
1010
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen)](https://hexdocs.pm/diffo_example/)
@@ -42,21 +42,22 @@ Contributions are welcome, please start with an [issue](https://github.com/diffo
4242

4343
## Acknowledgements
4444

45-
Thanks to [Telstra](https://www.telstra.com.au/) for supporting innovation in orchestration and inventory shared-tech which resulted in the award winning difference engine [2024 TMF Excellence Award in Autonomous Networks](https://www.tmforum.org/about/awards-and-recognition/excellence-awards/winners-2024/) powering three network service entities enabling outstanding product experience [2025 TMF Excellence Award in Customer Experience](https://www.tmforum.org/about/awards-and-recognition/excellence-awards/winners-2025/) and inspiring both this open source and internal shared-tech.
45+
Thanks to my colleagues in the Telco industry.
4646

47-
Thanks to the [Ash Core](https://github.com/ash-project) for [ash](https://github.com/ash-project/ash) 🚀
47+
Thanks to the vibrant Elixir and Ash communities, and in particular the [Ash Core](https://github.com/ash-project) for [ash](https://github.com/ash-project/ash) 🚀
4848

49-
Thanks to [Sagastume](https://github.com/sagastume) for [boltx](https://github.com/tiagodavi/ex4j) which is used by the [Ash Neo4j DataLayer](https://github.com/diffo-dev/ash_neo4j)
49+
Thanks to [Florin Patrascu](https://github.com/florinpatrascu) for [bolt_sips](https://github.com/florinpatrascu/bolt_sips) and[Luis Sagastume](https://github.com/sagastume) for [boltx](https://github.com/sagastume/boltx), both forerunners of [bolty](https://github.com/diffo-dev/bolty) the bolt driver for neo4j.
5050

5151
Thanks to the [Neo4j Core](https://github.com/neo4j) for [neo4j](https://github.com/neo4j/neo4j) and pioneering work on graph databases.
5252

5353
## Links
5454

5555
[Diffo TMF Service and Resource Manager](https://github.com/diffo-dev/diffo)
56+
[Diffo.dev](https://www.diffo.dev)
5657
[Ash Neo4j Datalayer](https://github.com/diffo-dev/ash_neo4j)
58+
[bolty](https://github.com/diffo-dev/bolty)
59+
[Neo4j Deployment Centre](https://neo4j.com/deployment-center/)
5760
[Ash Outstanding Extension](https://github.com/diffo-dev/ash_outstanding)
5861
[Outstanding Elixir Protocol](https://github.com/diffo-dev/outstanding)
59-
[Diffo.dev](https://www.diffo.dev)
60-
[Neo4j Deployment Centre](https://neo4j.com/deployment-center/)
6162
[TMF](https://www.tmforum.org)
6263

config/config.exs

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

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

config/dev.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import Config
66

7-
config :boltx, Bolt,
7+
config :bolty, Bolt,
88
uri: "bolt://localhost:7687",
99
auth: [username: "neo4j", password: "password"],
1010
user_agent: "DiffoExampleDev/1",

config/test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ config :logger, level: :warning
88
config :ash, disable_async?: true
99
config :ash, :missed_notifications, :ignore
1010

11-
config :boltx, Bolt,
11+
config :bolty, Bolt,
1212
uri: "bolt://localhost:7687",
1313
auth: [username: "neo4j", password: "password"],
1414
user_agent: "DiffoExampleTest/1",

lib/access/util.ex

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SPDX-FileCopyrightText: 2025 diffo_example contributors <https://github.com/diffo-dev/diffo_example/graphs.contributors>
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
defmodule DiffoExample.Access.Util do
6+
@moduledoc """
7+
Diffo - TMF Service and Resource Management with a difference
8+
9+
Access - Access domain utility functions
10+
"""
11+
12+
require Ash.Query
13+
14+
alias Diffo.Provider.Assignment
15+
16+
def assignments(instance, type) do
17+
Enum.reduce(instance.reverse_relationships, [], fn reverse_relationship, acc ->
18+
IO.inspect(reverse_relationship, label: :reverse_relationship)
19+
case reverse_relationship.type do
20+
:assignedTo ->
21+
characteristic =
22+
Enum.find(reverse_relationship.characteristics, &(&1.name == type))
23+
24+
case characteristic do
25+
nil ->
26+
acc
27+
28+
_ ->
29+
[
30+
%Assignment{
31+
id: characteristic.value,
32+
type: type,
33+
assignee_id: reverse_relationship.source_id
34+
}
35+
| acc
36+
]
37+
end
38+
end
39+
end)
40+
end
41+
end

lib/diffo_example/repo.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ defmodule DiffoExample.Repo do
1616
end
1717

1818
def start_link(_stack) do
19-
config = Application.get_env(:boltx, Bolt)
20-
Boltx.start_link(config)
19+
config = Application.get_env(:bolty, Bolt)
20+
Bolty.start_link(config)
2121
end
2222
end

mix.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule DiffoExample.MixProject do
66
@moduledoc false
77
use Mix.Project
88

9-
@version "0.0.2"
9+
@version "0.0.3"
1010
@name "DiffoExample"
1111
@description "Examples for Diffo TMF Service and Resource Manager"
1212
@github_url "https://github.com/diffo-dev/diffo-example"
@@ -78,8 +78,8 @@ defmodule DiffoExample.MixProject do
7878
# Run "mix help deps" to learn about dependencies.
7979
defp deps do
8080
[
81-
{:diffo, diffo_version("~> 0.1.3")},
82-
{:igniter, "~> 0.5", only: [:dev, :test]},
81+
{:diffo, diffo_version("~> 0.1.4")},
82+
{:igniter, "~> 0.6", only: [:dev, :test]},
8383
{:ex_doc, "~> 0.37", only: [:dev, :test], runtime: false}
8484
]
8585
end

0 commit comments

Comments
 (0)