Comments (4)
One step further:
[root@cns-ui-prg001 consul-api]# /usr/local/bin/consulate kv get test
b'[{"CreateIndex":58195,"ModifyIndex":58195,"LockIndex":0,"Key":"test","Flags":0,"Value":"VEVTVA=="}]'
but backup:
[root@server consul-api]# /usr/local/bin/consulate kv backup /opt/backup.dump
Traceback (most recent call last):
File "/usr/local/bin/consulate", line 9, in
load_entry_point('consulate==0.2.0', 'console_scripts', 'consulate')()
File "/usr/local/lib/python3.3/site-packages/consulate/cli.py", line 90, in main
handle.write(json.dumps(session.kv.records(),
File "/usr/local/lib/python3.3/site-packages/consulate/api.py", line 267, in records
response = self._get_list([''], {'recurse': None})
File "/usr/local/lib/python3.3/site-packages/consulate/api.py", line 83, in _get_list
result = self._get(params, query_params)
File "/usr/local/lib/python3.3/site-packages/consulate/api.py", line 77, in _get
response = self._adapter.get(self._build_uri(params, query_params))
File "/usr/local/lib/python3.3/site-packages/consulate/api.py", line 73, in _build_uri
urllib.urlencode(query_params))
AttributeError: 'module' object has no attribute 'urlencode'
from consulate.
you need to have Tornado:
sudo pip install tornado
from consulate.
The requirements.txt file in master doesn't list tornado, but the .20 version I installed on my Ubuntu 14.04 box with python 2.7 contains:
requests
[tornado]
tornado
Which produces the following when I run pip install -r against it:
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 262, in run
for req in parse_requirements(filename, finder=finder, options=options, session=session):
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1631, in parse_requirements
req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2786, in parse
reqs = list(parse_requirements(s))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2701, in parse_requirements
raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '[tornado]')
Whereas if I make the file simply:
requests
tornado
it works fine.
from consulate.
This was a problem with the distribution of 0.2.0. 0.3.0 will be out today.
from consulate.
Related Issues (20)
- Add TCP check to service registration HOT 1
- Add DeregisterCriticalServiceAfter and status parameters to server ttl check HOT 1
- Use PUT to deregister services and checks HOT 1
- CLI: Change backup to dump
- CLI: Consider adding wrapper for snapshot
- CLI: Add support for manipulating individual ACLs HOT 1
- Consul kv race condition 'Error setting "$key" (200)'
- Release 0.6.0 not fully working with newest Consul version
- Support service metadata for service registration
- Bug is in api method deregister service. HOT 3
- 0.7 release? HOT 3
- consulate can not support DeregisterCriticalServiceAfter params?
- minor typo in readme
- Filter nodes out, with maintenance state
- Python 3.9 support
- json encode problem
- Services should be deactivated using the HTTP PUT method.
- AttributeError: 'bytes' object has no attribute 'get' when Consul in leaderless state
- Add version feature to cli HOT 1
- pkg_resources.DistributionNotFound: argparse on latest rc 7 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consulate.