I am also facing same issue to connect local mongodb, what are the properties need to include if I want to specify mongodb host and pwd in the /service/config.json file for external mongoDB? please suggest....I see only below property in the config json...
{
"strict_schema": true
}
Below is the log of Node JS for local mongo db issue...
createImportJob :: POST /tmf-api/productCatalogManagement/v4/importJob localhost:8080
createImportJob :: validate request :: payloadType=importJob
Debug1111111111222222222
Debug111111111133333333
createImportJob :: validationRulesType2 does not include importJob
Debug1111111111444444444
Debug1111111111444444444
Debug1111111111444444444
Debug1111111111444444444
Debug1111111111444444444
processCommonAttributes:: typedef={
"description": "Represents a task used to import resources from a file",
"example": {
"@baseType": "@baseType",
"@schemaLocation": "http://example.com/aeiou",
"@type": "@type",
"completionDate": "2000-01-23T04:56:07.000+00:00",
"contentType": "contentType",
"creationDate": "2000-01-23T04:56:07.000+00:00",
"errorLog": "errorLog",
"href": "href",
"id": "id",
"path": "path",
"status": {},
"url": "url"
},
"properties": {
"@baseType": {
"description": "When sub-classing, this defines the super-class",
"type": "string"
},
"@schemaLocation": {
"description": "A URI to a JSON-Schema file that defines additional attributes and relationships",
"format": "uri",
"type": "string"
},
"@type": {
"description": "When sub-classing, this defines the sub-class entity name",
"type": "string"
},
"completionDate": {
"description": "Date at which the job was completed",
"format": "date-time",
"type": "string"
},
"contentType": {
"description": "Indicates the format of the imported data",
"type": "string"
},
"creationDate": {
"description": "Date at which the job was created",
"format": "date-time",
"type": "string"
},
"errorLog": {
"description": "Reason for failure if status is failed",
"type": "string"
},
"href": {
"description": "Reference of the import job",
"type": "string"
},
"id": {
"description": "Identifier of the import job",
"type": "string"
},
"path": {
"description": "URL of the root resource where the content of the file specified by the import job must be applied",
"type": "string"
},
"status": {
"$ref": "#/definitions/JobStateType",
"description": "Status of the import job (not started, running, succeeded, failed)"
},
"url": {
"description": "URL of the file containing the data to be imported",
"type": "string"
}
},
"type": "object"
}
createImportJob: error=AssertionError [ERR_ASSERTION]: App must be bound to compose-for-mongodb service
------------------------------
Harikrishna Chavali
Oracle Corporation
------------------------------
Original Message:
Sent: Mar 04, 2020 09:26
From: Henrique Rodrigues
Subject: Issues getting started with reference implementation code
Hello @Ben R I'm sorry you are having problems with the RI.
Thank you for bringing the typo on the location of the config.json to my attention, it is now fixed for this repository.
The default configuration expect the database to be running locally on the default port (localhost:27017).
If can please send me the error output to my e-mail (hrodrigues@tmforum.org) I will be happy yo help you run the RI.
Best Regards,
Henrique Rodrigues
------------------------------
Henrique Rodrigues
TM Forum
Original Message:
Sent: Mar 04, 2020 07:23
From: Ben R
Subject: Issues getting started with reference implementation code
Hi,
I've downloaded the reference implementation project for TMF 632, and I'm having issues getting it up and running so I can see it in action.
I've imported the project into my IDE, run npm install, and then executed npm start.
I'm now facing issues with MongoDB connection. I've installed MongoDB community edition locally, such that it should now in principle be accessible via localhost:27017. However, I have been unable to provide this URL to the mongoUtils.js class via configuration.
The documentation in the README is extremely sparse - it just says "start local mongoDB (or change /service/config.json file for external mongoDB)".
Aside from the fact that that config.json file is at the project root, and not in service/, it's extremely unclear to me how exactly I specify the connection without hardcoding it in mongoUtils.
Can anyone advise?
------------------------------
Ben R
TDC
------------------------------