Author Topic: PSDK export/import objects  (Read 3278 times)

Offline carpio

  • Newbie
  • *
  • Posts: 34
  • Karma: 0
PSDK export/import objects
« on: September 26, 2017, 07:42:20 AM »
Hello,

I want to create a export/import program and would like to ask if somone can recommend a good way of doing this?

Retrieving Objects I managed and also how to create or change them but I always did it like this:

CfGPersonQuery query = new CfgPersonQuery(service) {Username = "test"}
CfGPerson person = query.Execute();
MessageBox.Show(person.Single().toString());

I could save everything i retrieve in a document a read it in for importing.
But I think there must be a easier way of doing this.
I have checked the Genesys documentation and saw also that there is a way of getting the CfgObject as a xml.

Can someone explain me how I can receive theMessage after sending a RequestReadObjects2?
Because I followed the Genesys documentation but could not find how the message is returned and retrieved.

Thanks


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: PSDK export/import objects
« Reply #1 on: September 26, 2017, 02:19:35 PM »
Search the forum, similar question has been covered already

Enviado de meu E6633 usando Tapatalk


Offline jarrod

  • Newbie
  • *
  • Posts: 42
  • Karma: 1
    • InProd CMS
Re: PSDK export/import objects
« Reply #2 on: September 27, 2017, 01:19:29 AM »
Would you be interested in a RESTful JSON API interface for the PSDK? pm me.

That could make your life a lot easier.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: PSDK export/import objects
« Reply #3 on: September 27, 2017, 02:39:12 AM »
[quote author=jarrod link=topic=10639.msg48318#msg48318 date=1506475169]
Would you be interested in a RESTful JSON API interface for the PSDK? pm me.

That could make your life a lot easier.
[/quote]Do you have such products?
Because URS basically does it too ;) so would be nice to know the difference and which advantage you could provide


Enviado de meu E6633 usando Tapatalk


Offline jarrod

  • Newbie
  • *
  • Posts: 42
  • Karma: 1
    • InProd CMS
Re: PSDK export/import objects
« Reply #4 on: September 29, 2017, 02:35:48 AM »
[quote author=cavagnaro link=topic=10639.msg48319#msg48319 date=1506479952]
Do you have such products?
[/quote]

It is not something that we market very well, yes we do.

We built a component which we call Aft, it is a small java app that acts as an interface to the PSDK for reading and writing config server data and controlling (start / stop) applications via SCS. This is a core part of the InProd solution but can be used on its own.

In terms of basic requirements for routing, it might be best to stay with the built-in tools within URS for reading config data as there would not be a strong enough advantage in using ours. Not sure what the capabilities are for URS to update all config objects, that might be a good use case.

The best uses for this tool would be around scripted or bulk changes maybe even building a custom interface to do what GAX OPM really should do. But our main product does all that, this would be if you wanted to roll your own but do not like the taste of the PSDK.


Offline carpio

  • Newbie
  • *
  • Posts: 34
  • Karma: 0
Re: PSDK export/import objects
« Reply #5 on: September 29, 2017, 07:36:22 AM »
The reason was more for me o understand if there is a good way of doing a export with the psdk.
I also read the documentation and did not understand how the xml can be retreived.
It explain how to sent the request but not how to get the message.

I could build my own xml file or csv file and export the data and import it but I thought there might be a easier way with the psdk.
When I saw the xml export, I wanted to try but never succeed.

The tool I want to create should export some object from Test to Production and I also would like to build it, to learn an understan dthe psdk better.

Offline jarrod

  • Newbie
  • *
  • Posts: 42
  • Karma: 1
    • InProd CMS
Re: PSDK export/import objects
« Reply #6 on: October 02, 2017, 12:44:52 AM »
What you have briefly described is exactly what our product InProd is designed to do.

A configuration object or recorded changes can be imported into a 'change set' to package up a number of changes into one action. This can then be targeted at a new environment and factors in the complexity of the dependent objects and differences between environments such as the changes in dbid values. The main concept is around promoting changes from one environment to another with minimal effort. But there are many other features as well.

I would suggest against using XML as this approach is painful when writing the object back in. We deal with each parameter on the Cfg object and serialise it to JSON. Writing a change back in is the same process in reverse. Forgive me for not being willing to share the code ::)

What you are attempting to do it not trivial once you factor in all of the Genesys objects and the different data types, working with the PSDK requires good Java knowledge as the documentation is limited, to address this Genesys steer people towards the PSDK training course.