Thanks Francois.
graphman sounds very interesting and might help not only in this case, well, but not now, if you know what I mean;)
migrateOut the folders itself is of course no option, as it would contain everything in that folder as well, as you already mentioned.
I was wondering that the folders of the folder-path are not part of the bundle as dependencies, as they are referenced to each other, similar to all other chained dependencies, in my understanding.
One idea I had to achieve what I am looking for is:
- As part of the exported bundle, the resource (service) is referencing the folder in its folderId property
- loop through folders, starting with the folderId, until upmost root folder is reached
- export folder folderId resource by GMU restman GET
- check, if folderId exists by GMU restman GET in target gateway
- update(PUT) or insert(POST) folder resource to target gateway
- use folderId property of current folder as next folderId
This kind of procedure could easily be implemented in a script.
Maybe someone can let me know if this approach is suitable.
Or tell me a different, maybe even simpler one.
Thanks
...Michael
Original Message:
Sent: Nov 17, 2022 11:21 AM
From: Francois Lascelles
Subject: GMU: deploy service including folder path
Hello Michael,
If you migrateOut with the option --folderName your_folder, The folder object will be included in your bundle but everything else in that folder is also pulled out. There might be a better way to handle this with GMU, and I will let more experienced GMU subject matter experts weigh in on this part of it.
However, I do want to point out the next-generation config management API named graphman which is designed to avoid many usability issues with restman + GMU. For example, in graphman, folder objects are just transparently handled. In graphman, folder is a property of services and policies and when you write one of those objects, the folder object will be created as needed on the receiving end. This is one of many ways graphman aims to facilitate your config management experience and please drop me a note at francois.lascelles@broadcom.com if you want to be invited to the experimental version of it which works with gateway versions 10.0 and 10.1. In there you will find the assertion as well as the client-side tooling including a rich postman collection as well as cli commands and samples.
Original Message:
Sent: Nov 17, 2022 05:20 AM
From: Michael Mueller
Subject: GMU: deploy service including folder path
Hello.
I am trying to deploy a service with the help of GMU.
The service itself resides in a subfolder tree which does not exist in the target gateway.
Example: Service Name "folderA/folderB/folderC/Service"
If I migrateOut this service to a singlefile, the bundle contains "only" the service and its dependencies, but not the folders.
hence the migrateIn fails, as all the folders do not exist.
What is the best approach to deploy such a service including the full folder path?
Sorry if this has been asked before.
Thanks and regards
...Michael