Skip to content

Commit 578a0b0

Browse files
committed
Update to support fsa for ders.
1 parent 4522445 commit 578a0b0

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

ieee_2030_5/hrefs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
DERC = "derc"
2121
DDERC = "dderc"
2222
DERCA = "derca"
23+
DERCURVE = "dc"
2324
FSA = "fsa"
2425
TIME = "tm"
2526

ieee_2030_5/server/derfs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ def get(self) -> Response:
122122
retval = adpt.ListAdapter.get_resource_list(request.path, start, after, limit)
123123
elif parsed.at(2) == hrefs.DDERC:
124124
retval = adpt.ListAdapter.get_single(request.path)
125+
elif parsed.at(2) == hrefs.DERCURVE:
126+
retval = adpt.ListAdapter.get_resource_list(request.path, start, after, limit)
125127
# elif parsed.at(2) == hrefs.DDERC:
126128
# retval = adpt.DERControlAdapter.fetch_at(parsed.at(3))
127129
else:

ieee_2030_5/server/server_constructs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from ieee_2030_5.certs import TLSRepository, lfdi_from_fingerprint
88
from ieee_2030_5.config import ServerConfiguration, DeviceConfiguration
99
from ieee_2030_5.data.indexer import add_href, get_href
10-
from ieee_2030_5.utils.tls_wrapper import OpensslWrapper
1110

1211
_log = logging.getLogger(__name__)
1312

@@ -182,10 +181,11 @@ def create_der_program_and_control(default_der_program: m.DERProgram,
182181
derp.ActiveDERControlListLink = m.ActiveDERControlListLink(program_hrefs.active_control_href)
183182
derp.DefaultDERControlLink = m.DefaultDERControlLink(program_hrefs.default_control_href)
184183
derp.DERControlListLink = m.DERControlListLink(program_hrefs.der_control_list_href)
185-
# derp.DERCurveListLink = m.DERCurveListLink(program_hrefs.der_curve_list_href)
184+
derp.DERCurveListLink = m.DERCurveListLink(program_hrefs.der_curve_list_href)
186185

187186
dderc.href = derp.DefaultDERControlLink.href
188187

188+
adpt.ListAdapter.initialize_uri(program_hrefs.der_curve_list_href, m.DERCurve)
189189
adpt.ListAdapter.append(hrefs.DEFAULT_DDERC_ROOT, dderc)
190190
adpt.ListAdapter.append(hrefs.DEFAULT_DERP_ROOT, derp)
191191
return derp, dderc
@@ -402,10 +402,10 @@ def initialize_2030_5(config: ServerConfiguration, tlsrepo: TLSRepository):
402402
adpt.ListAdapter.set_single(obj=dderc, uri=dderc.href)
403403
derp_derc_list_href = hrefs.SEP.join((derp.href, "derc"))
404404
adpt.ListAdapter.initialize_uri(list_uri=derp_derc_list_href, obj=m.DERControl)
405-
derp_derc: m.DERControl = m.DERControl(DERControlBase=dderc.DERControlBase)
406-
adpt.ListAdapter.append(list_uri=derp_derc_list_href, obj=derp_derc)
405+
#derp_derc: m.DERControl = m.DERControl(DERControlBase=dderc.DERControlBase)
406+
#adpt.ListAdapter.append(list_uri=derp_derc_list_href, obj=derp_derc)
407407

408-
adpt.ListAdapter.set_single(uri=derp_derc.href, obj=derp_derc)
408+
#adpt.ListAdapter.set_single(uri=derp_derc.href, obj=derp_derc)
409409

410410
if fsa_list := adpt.ListAdapter.get_list(ed_href.function_set_assignments):
411411
# Create a new der program for this specific fsa

0 commit comments

Comments
 (0)