File tree Expand file tree Collapse file tree 6 files changed +40062
-2
lines changed
API/OCM.Net/OCM.API.Model/OCPI Expand file tree Collapse file tree 6 files changed +40062
-2
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,9 @@ private string GetCountryCodeFromISO3(string srcISO)
221221 System . Diagnostics . Debug . WriteLine ( $ "Excluding location { cp . DataProvidersReference } ") ;
222222 cp . StatusTypeID = ( int ) StandardStatusTypes . RemovedDuplicate ;
223223 }
224-
224+
225225 yield return cp ;
226-
226+
227227 }
228228 }
229229 }
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ public List<IImportProvider> GetImportProviders(List<OCM.API.Common.Model.DataPr
214214 providers . Add ( new ImportProvider_ElectricEra ( ) ) ;
215215 providers . Add ( new ImportProvider_ITCharge ( ) ) ;
216216 providers . Add ( new ImportProvider_Voltrelli ( ) ) ;
217+ providers . Add ( new ImportProvider_PowerGo ( ) ) ;
217218
218219 //populate full data provider details for each import provider
219220 foreach ( var provider in providers )
Original file line number Diff line number Diff line change 1+ using System . Collections . Generic ;
2+ using OCM . API . Common . Model ;
3+
4+ namespace OCM . Import . Providers . OCPI
5+ {
6+ public class ImportProvider_PowerGo : ImportProvider_OCPI , IImportProvider
7+ {
8+ public ImportProvider_PowerGo ( ) : base ( )
9+ {
10+ ProviderName = "powergo" ;
11+ OutputNamePrefix = "powergo" ;
12+
13+ IsAutoRefreshed = true ;
14+ IsProductionReady = true ;
15+
16+ CredentialKey = "OCPI-POWERGO" ;
17+
18+ DefaultOperatorID = 3632 ;
19+
20+ Init ( dataProviderId : 38 , "https://powerops.powerfield.nl/ocpi/cpo/2.2/locations" ) ;
21+ }
22+
23+ public override Dictionary < string , int > GetOperatorMappings ( )
24+ {
25+ return new Dictionary < string , int > ( )
26+ {
27+ { "PFG" , 3632 }
28+ } ;
29+ }
30+
31+ public new List < ChargePoint > Process ( CoreReferenceData coreRefData )
32+ {
33+ var outputList = base . Process ( coreRefData ) ;
34+
35+ return outputList ;
36+ }
37+ }
38+
39+ }
Original file line number Diff line number Diff line change 1+ # Adding an OCPI Provider
2+
3+ To add a new OCPI Provider:
4+ - download and verify the OCPI feed manually to check credentials and data format
5+ - add a test with a copy of the json feed in OCM.API.Tests -ImportTests. Review test for data consistency and completeness.
6+ - Implement an OCPI provider with required settings in OCM.Import.Common.Providers.OCPI
7+ - Add a new data provider ID in DB and in the import provider.
8+ - Review the network operator mapings in the new import provider. Provider will at least map to their own network operator
9+ - if providing services for other operators there may be may operators to map to.
10+ - Store Import credentials (Authorization header value etc) in Azure keyvault
11+ - Add import provider to OCM.Import.Worker
12+ - appsettings.json EnabledImports
13+ - add provider to OCM.Import.Common.ImportManager -
14+
You can’t perform that action at this time.
0 commit comments