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
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
erlang 28.1
elixir 1.19.4-otp-28
erlang 28.3.1
elixir 1.19.5-otp-28
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
## [v0.0.2](https://github.com/diffo-dev/diffo/compare/v0.0.1..v0.0.2) (2025-12-01)

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

## [v0.0.3](https://github.com/diffo-dev/diffo/compare/v0.0.1..v0.0.2) (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
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SPDX-FileCopyrightText: 2025 diffo_example contributors <https://github.com/diff
SPDX-License-Identifier: MIT
-->

# Diffo Examples
# Diffo Example

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

## Acknowledgements

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.
Thanks to my colleagues in the Telco industry.

Thanks to the [Ash Core](https://github.com/ash-project) for [ash](https://github.com/ash-project/ash) 🚀
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) 🚀

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)
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.

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

## Links

[Diffo TMF Service and Resource Manager](https://github.com/diffo-dev/diffo)
[Diffo.dev](https://www.diffo.dev)
[Ash Neo4j Datalayer](https://github.com/diffo-dev/ash_neo4j)
[bolty](https://github.com/diffo-dev/bolty)
[Neo4j Deployment Centre](https://neo4j.com/deployment-center/)
[Ash Outstanding Extension](https://github.com/diffo-dev/ash_outstanding)
[Outstanding Elixir Protocol](https://github.com/diffo-dev/outstanding)
[Diffo.dev](https://www.diffo.dev)
[Neo4j Deployment Centre](https://neo4j.com/deployment-center/)
[TMF](https://www.tmforum.org)

2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ config :spark,
]
]

config :diffo, ash_domains: [Diffo.Provider, Diffo.Access]
config :diffo, ash_domains: [Diffo.Provider]
config :diffo_example, ash_domains: [DiffoExample.Access]
import_config "#{config_env()}.exs"
2 changes: 1 addition & 1 deletion config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import Config

config :boltx, Bolt,
config :bolty, Bolt,
uri: "bolt://localhost:7687",
auth: [username: "neo4j", password: "password"],
user_agent: "DiffoExampleDev/1",
Expand Down
2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ config :logger, level: :warning
config :ash, disable_async?: true
config :ash, :missed_notifications, :ignore

config :boltx, Bolt,
config :bolty, Bolt,
uri: "bolt://localhost:7687",
auth: [username: "neo4j", password: "password"],
user_agent: "DiffoExampleTest/1",
Expand Down
41 changes: 41 additions & 0 deletions lib/access/util.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: 2025 diffo_example contributors <https://github.com/diffo-dev/diffo_example/graphs.contributors>
#
# SPDX-License-Identifier: MIT

defmodule DiffoExample.Access.Util do
@moduledoc """
Diffo - TMF Service and Resource Management with a difference

Access - Access domain utility functions
"""

require Ash.Query

alias Diffo.Provider.Assignment

def assignments(instance, type) do
Enum.reduce(instance.reverse_relationships, [], fn reverse_relationship, acc ->
IO.inspect(reverse_relationship, label: :reverse_relationship)
case reverse_relationship.type do
:assignedTo ->
characteristic =
Enum.find(reverse_relationship.characteristics, &(&1.name == type))

case characteristic do
nil ->
acc

_ ->
[
%Assignment{
id: characteristic.value,
type: type,
assignee_id: reverse_relationship.source_id
}
| acc
]
end
end
end)
end
end
4 changes: 2 additions & 2 deletions lib/diffo_example/repo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defmodule DiffoExample.Repo do
end

def start_link(_stack) do
config = Application.get_env(:boltx, Bolt)
Boltx.start_link(config)
config = Application.get_env(:bolty, Bolt)
Bolty.start_link(config)
end
end
6 changes: 3 additions & 3 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.0.2"
@version "0.0.3"
@name "DiffoExample"
@description "Examples for Diffo TMF Service and Resource Manager"
@github_url "https://github.com/diffo-dev/diffo-example"
Expand Down Expand Up @@ -78,8 +78,8 @@ defmodule DiffoExample.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:diffo, diffo_version("~> 0.1.3")},
{:igniter, "~> 0.5", only: [:dev, :test]},
{:diffo, diffo_version("~> 0.1.4")},
{:igniter, "~> 0.6", only: [:dev, :test]},
{:ex_doc, "~> 0.37", only: [:dev, :test], runtime: false}
]
end
Expand Down
Loading
Loading