@@ -12,7 +12,6 @@ defmodule DiffoExample.Access.DslAccess do
1212 alias Diffo.Provider.BaseInstance
1313 alias Diffo.Provider.Instance.Characteristic
1414 alias Diffo.Provider.Instance.Place
15- alias Diffo.Provider.Instance.ActionHelper
1615
1716 alias DiffoExample.Access
1817
@@ -25,25 +24,33 @@ defmodule DiffoExample.Access.DslAccess do
2524 plural_name :DslAccesses
2625 end
2726
28- specification do
29- id "da9b207a-26c3-451d-8abd-0640c6349979"
30- name "dslAccess"
31- description "A DSL Access Network Service connecting a subscriber premises to an NNI"
32- category "Network Service"
33- end
27+ structure do
28+ specification do
29+ id "da9b207a-26c3-451d-8abd-0640c6349979"
30+ name "dslAccess"
31+ description "A DSL Access Network Service connecting a subscriber premises to an NNI"
32+ category "Network Service"
33+ end
3434
35- features do
36- feature :dynamic_line_management do
37- is_enabled? true
38- characteristic :constraints , DiffoExample.Access.Constraints
35+ features do
36+ feature :dynamic_line_management do
37+ is_enabled? true
38+ characteristic :constraints , DiffoExample.Access.Constraints
39+ end
40+ end
41+
42+ characteristics do
43+ characteristic :dslam , DiffoExample.Access.Dslam
44+ characteristic :aggregate_interface , DiffoExample.Access.AggregateInterface
45+ characteristic :circuit , DiffoExample.Access.Circuit
46+ characteristic :line , DiffoExample.Access.Line
3947 end
4048 end
4149
42- characteristics do
43- characteristic :dslam , DiffoExample.Access.Dslam
44- characteristic :aggregate_interface , DiffoExample.Access.AggregateInterface
45- characteristic :circuit , DiffoExample.Access.Circuit
46- characteristic :line , DiffoExample.Access.Line
50+ behaviour do
51+ actions do
52+ create :qualify
53+ end
4754 end
4855
4956 state_machine do
@@ -59,15 +66,6 @@ defmodule DiffoExample.Access.DslAccess do
5966 accept [ :id , :name , :type , :which ]
6067 argument :places , { :array , :struct }
6168 argument :parties , { :array , :struct }
62- argument :specified_by , :uuid , public?: false
63- argument :characteristics , { :array , :uuid } , public?: false
64- argument :features , { :array , :uuid } , public?: false
65-
66- change before_action ( fn changeset , _context -> ActionHelper . build_before ( changeset ) end )
67-
68- change after_action ( fn changeset , result , _context ->
69- ActionHelper . build_after ( changeset , result , Access , :get_dsl_by_id )
70- end )
7169
7270 change load [ :href ]
7371 upsert? false
0 commit comments