Commit bd15a8d7 authored by julian.gethmann's avatar julian.gethmann

Update Cassandra URL to new Cassandra deployment

parent cc58e1cf
Pipeline #14505 failed with stage
in 1 minute and 3 seconds
......@@ -3,6 +3,10 @@ Changelog
=========
* [TODO] Add the raw PV name option to the command line interface
0.6.0 (2017-10-11)
------------------
* Change the `HOSTNAME` and URI schema to match the new Cassandra deployment (see Sebastian Marsching's Mail from October 11, 2017).
0.5.7 (2017-09-27)
------------------
* Add option `save_local` to :func:`pvs2pd`
......
......@@ -285,7 +285,7 @@ class Cassandra(object):
>>> clic_field
([datetime.datetime(2016, 4, 13, 10, 59, 59, 250177), datetime.datetime(2016, 4, 13, 11, 0, 0, 250285), datetime.datetime(2016, 4, 13, 11, 0, 1, 250484)], [0.9991628617721655, 0.9992209719948126, 0.9991912895254449])
"""
HOSTNAME = "ankasr-main.anka.kit.edu"
HOSTNAME = "ankasr-archiver.anka.kit.edu"
PORT = 9812
RETRIES = 10
......@@ -351,14 +351,17 @@ class Cassandra(object):
which should cause the request of the raw data.
.. versionchanged:: 0.5
.. versionchanged:: 0.6
URL schema changed, because of a new Cassandra deployment
"""
start_timestamp = CassandraHelper().cassandra_time(self.start_time)
end_timestamp = CassandraHelper().cassandra_time(self.end_time)
if self.count:
url = "http://{host}:{port}/archive/1/samples/{pv}?start={starttime}&end={endtime}&count={count}"
url = "http://{host}:{port}/archive-access/api/1.0/archive/1/samples/{pv}?start={starttime}&end={endtime}&count={count}"
else:
url = "http://{host}:{port}/archive/1/samples/{pv}?start={starttime}&end={endtime}"
url = "http://{host}:{port}/archive-access/api/1.0/archive/1/samples/{pv}?start={starttime}&end={endtime}"
return url.format(**{"port": self.PORT, "host": self.HOSTNAME,
"starttime": start_timestamp, "endtime": end_timestamp,
......
......@@ -3,7 +3,7 @@
from setuptools import find_packages
from setuptools import setup
__version__ = '0.5.7'
__version__ = '0.6.0a1'
def readme():
......@@ -27,14 +27,14 @@ setup(name="cassandra",
long_description=readme(),
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Development Status :: 3 - Alpha",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: BSD License",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Topic :: Database :: Front-Ends",
],
keywords="cassandra css control system studio",
url="http://git.anka.kit.edu/gethmann/cassandra",
url="http://git.scc.kit.edu/las/py/cassandra",
author="Julian Gethmann",
author_email="phd@gethmann.org",
license="BSD (3)",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment