Skip to content

Commit

Permalink
POST descriptors with database
Browse files Browse the repository at this point in the history
  • Loading branch information
aorzelskiGH committed Jul 2, 2024
1 parent 6918d72 commit dc0ade4
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 118 deletions.
2 changes: 1 addition & 1 deletion src/AasxServerBlazor/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"AasxServerBlazor": {
"commandName": "Project",
"commandLineArgs": "--no-security --secret-string-api 1234 --aasx-in-memory 1000 --data-path \"REPLACE-ME-WITH-YOUR-LOCAL-PATH\" --edit --external-blazor http://localhost:5001",
"commandLineArgs": "--no-security --secret-string-api 1234 --aasx-in-memory 1000 --data-path \"\\\\wsl.localhost\\Ubuntu\\home\\oze\\Integration-Plugfest\\aasxs-registry\" --edit --external-blazor http://localhost:5001",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
Expand Down
2 changes: 1 addition & 1 deletion src/AasxServerStandardBib/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ private static async Task<int> Run(CommandLineArguments a)
// try
{
fn = fileNames[ fi ];
if (fn.ToLower().Contains("globalsecurity"))
if (fn.ToLower().Contains("globalsecurity") || fn.ToLower().Contains("registry"))
{
envFileName[ envi ] = fn;
env[ envi ] = new AdminShellPackageEnv(fn, true, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using static AasxServer.Program;
using AasxServerDB;
using AasxServerDB.Entities;
using System;

namespace IO.Swagger.Registry.Lib.V3.Services
{
Expand All @@ -26,6 +27,11 @@ public AasRegistryService(IAppLogger<AasRegistryService> logger, IRegistryInitia
}

public AssetAdministrationShellDescriptor CreateAasDescriptorFromDB(AASSet aasDB)
{
return GlobalCreateAasDescriptorFromDB(aasDB);
}

public static AssetAdministrationShellDescriptor GlobalCreateAasDescriptorFromDB(AASSet aasDB)
{
AssetAdministrationShellDescriptor ad = new AssetAdministrationShellDescriptor();
//string asset = aas.assetRef?[0].Value;
Expand All @@ -42,7 +48,8 @@ public AssetAdministrationShellDescriptor CreateAasDescriptorFromDB(AASSet aasDB
e.ProtocolInformation.Href =
AasxServer.Program.externalRepository + "/shells/" +
Base64UrlEncoder.Encode(ad.Id);
_logger.LogDebug("AAS " + ad.IdShort + " " + e.ProtocolInformation.Href);
// _logger.LogDebug("AAS " + ad.IdShort + " " + e.ProtocolInformation.Href);
Console.WriteLine("AAS " + ad.IdShort + " " + e.ProtocolInformation.Href);
e.Interface = "AAS-1.0";
ad.Endpoints = new List<Models.Endpoint>
{
Expand Down
Loading

0 comments on commit dc0ade4

Please sign in to comment.