zato-connection-registry: Load, Backup and Restore your Zato connection definitions
Zato
Zato is an open-source enterprise service bus solution for SOA.
It's built with Python2. And have amazing features if you need an ESB, in python ecosystem.
We have been experimenting with Zato, mainly, using it as an API gateway on our internal services. (REST APIs.) That process requires to define all our internal services. A simple connection definition holds these kind of data:
- Service Name
- Url/Path
- Data Format (JSON, etc.)
- Content Type
- Security Definition (RBAC, Basic Auth, etc.)
- ...
If you maintain lots of REST API service definitions and experiment Zato at the same time (spinning up new Zato instances for development, or having multiple Zato instances without sharing the database) then it may be a pain to migrate these services.
Of course, it's possible to do that migration with the internal Zato database. However, it's not much practical.
That brought the idea of having a backup/restore tool for Zato connection definitions.
zato-connection-registry
zato-connection-registry is a command line application/library to load, backup, restore REST connection definitions in Zato servers. (It can also serve as a python library.)
alias zct='zato_connection_registry'
This tool uses Zato's internal services to fetch and pull service definitions, and uses zato-client package.
Backup files are stored in the JSON format.
Note: Since zato-client
package is a requirement for this tool, and python2 only, zato-connection-registry is also a python2 project.
Installation
$ pip install zato-connection-registry
Commands
- Backup connection definitions
$ zato_connection_registry http://172.31.52.2:11223 pubapi:123 /tmp/foo.json
- Restore connection definitions
$ zato_connection_registry restore http://172.31.52.2:11223 pubapi:123 /tmp/foo.json
Using zato-connection-registry as a library
After the installation, you can also use the package as a Python library:
from zato_connection_registry.registry import Registry
r = Registry(
"http://localhost:11223",
"pubapi",
"123",
)
r.load_rest_channels()
print(r.rest_channels)
Limitations
- Only REST channel definitions (including incoming and outcoing) are supported.
Running tests
python tests.py
...
----------------------------------------------------------------------
Ran 3 tests in 0.049s
OK
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Thank you for your review, @helo! Keep up the good work!
$rewarding 100% 10min
Hi @emrebeyler!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Thank you so much for participating the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!
Hey, @emrebeyler!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Look at that birthday pos. !BEER
View or trade
BEER
.Hey @emrebeyler, here is a little bit of
BEER
from @isnochys for you. Enjoy it!