Commit 119fd993 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

move python lib path ISC/CC to isc/cc


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@695 e5f2f494-b856-4b98-b285-d166d9295462
parent 7dbb48a6
......@@ -34,7 +34,10 @@ pyshared:
mkdir pyshared
mkdir pyshared/isc
ln -s ${abs_top_srcdir}/src/lib/config/python/isc/config pyshared/isc/config
ln -s ${abs_top_srcdir}/src/lib/cc/python/ISC/CC pyshared/isc/cc
cat ${abs_top_srcdir}/src/lib/config/python/isc/__init__.py >> pyshared/isc/__init__.py
ln -s ${abs_top_srcdir}/src/lib/cc/python/isc/cc pyshared/isc/cc
ln -s ${abs_top_srcdir}/src/lib/cc/python/isc/cc pyshared/isc/Util
cat ${abs_top_srcdir}/src/lib/cc/python/isc/__init__.py >> pyshared/isc/__init__.py
include:
mkdir include
......
......@@ -157,9 +157,9 @@ AC_CONFIG_FILES([Makefile
src/lib/cc/Makefile
src/lib/cc/cpp/Makefile
src/lib/cc/python/Makefile
src/lib/cc/python/ISC/Makefile
src/lib/cc/python/ISC/CC/Makefile
src/lib/cc/python/ISC/Util/Makefile
src/lib/cc/python/isc/Makefile
src/lib/cc/python/isc/cc/Makefile
src/lib/cc/python/isc/Util/Makefile
src/lib/config/Makefile
src/lib/config/cpp/Makefile
src/lib/config/python/Makefile
......
......@@ -46,7 +46,7 @@ import select
import pprint
from optparse import OptionParser, OptionValueError
import ISC.CC
import isc.cc
import isc
# This is the version that gets displayed to the user.
......@@ -164,8 +164,8 @@ class BoB:
return "Unable to connect to c-channel after 5 seconds"
# try to connect, and if we can't wait a short while
try:
self.cc_session = ISC.CC.Session(self.c_channel_port)
except ISC.CC.session.SessionError:
self.cc_session = isc.cc.Session(self.c_channel_port)
except isc.cc.session.SessionError:
time.sleep(0.1)
#self.cc_session.group_subscribe("Boss", "boss")
......
......@@ -8,7 +8,7 @@ BIND10_PATH=@abs_top_builddir@/src/bin/bind10
PATH=@abs_top_builddir@/src/bin/msgq:@abs_top_builddir@/src/bin/auth:@abs_top_builddir@/src/bin/cfgmgr:@abs_top_builddir@/src/bin/cmdctl:$PATH
export PATH
PYTHONPATH=@abs_top_srcdir@/src/lib/cc/python:@abs_top_srcdir@/src/lib/config/python
PYTHONPATH=@abs_top_srcdir@/pyshared/
export PYTHONPATH
B10_FROM_SOURCE=@abs_top_srcdir@
......
......@@ -20,8 +20,8 @@ from exception import *
from moduleinfo import *
from cmdparse import BindCmdParse
from xml.dom import minidom
import ISC
import ISC.CC.data
import isc
import isc.cc.data
import http.client
import json
import inspect
......@@ -85,7 +85,7 @@ class BindCmdInterpreter(Cmd):
return False
# Get all module information from cmd-ctrld
self.config_data = ISC.CC.data.UIConfigData(self)
self.config_data = isc.cc.data.UIConfigData(self)
self.update_commands()
self.cmdloop()
except KeyboardInterrupt:
......@@ -453,9 +453,9 @@ class BindCmdInterpreter(Cmd):
self.config_data.commit(self)
elif cmd.command == "go":
self.go(identifier)
except ISC.CC.data.DataTypeError as dte:
except isc.cc.data.DataTypeError as dte:
print("Error: " + str(dte))
except ISC.CC.data.DataNotFoundError as dnfe:
except isc.cc.data.DataNotFoundError as dnfe:
print("Error: " + identifier + " not found")
except KeyError as ke:
print("Error: missing " + str(ke))
......
......@@ -16,7 +16,7 @@
from moduleinfo import *
from bindcmd import *
import ISC
import isc
import pprint
......
import ISC
import isc
import signal
import ast
import pprint
import os
from ISC.CC import data
from isc.cc import data
class ConfigManagerData:
CONFIG_VERSION = 1
......@@ -58,7 +58,7 @@ class ConfigManager:
self.data_definitions = {}
self.data_path = data_path
self.config = ConfigManagerData(data_path)
self.cc = ISC.CC.Session()
self.cc = isc.cc.Session()
self.cc.group_subscribe("ConfigManager")
self.cc.group_subscribe("Boss", "ConfigManager")
self.running = False
......
......@@ -33,7 +33,7 @@ import urllib.parse
import json
import re
import ssl, socket
import ISC
import isc
import pprint
import select
import csv
......@@ -180,7 +180,7 @@ class CommandControl():
'''
def __init__(self):
self.cc = ISC.CC.Session()
self.cc = isc.cc.Session()
self.cc.group_subscribe('Cmd-Ctrld')
#self.cc.group_subscribe('Boss', 'Cmd-Ctrld')
self.command_spec = self.get_cmd_specification()
......@@ -339,7 +339,7 @@ def run(server_class = SecureHTTPServer, addr = 'localhost', port = 8080):
if __name__ == '__main__':
try:
run()
except ISC.CC.SessionError as se:
except isc.cc.SessionError as se:
print("[b10-cmdctl] Error creating b10-cmdctl, "
"is the command channel daemon running?")
except KeyboardInterrupt:
......
......@@ -17,7 +17,7 @@ import pprint
import random
from optparse import OptionParser, OptionValueError
import ISC.CC
import isc.cc
# This is the version that gets displayed to the user.
__version__ = "v20091030 (Paving the DNS Parking Lot)"
......@@ -202,7 +202,7 @@ class MsgQ:
return
try:
routingmsg = ISC.CC.message.from_wire(routing)
routingmsg = isc.cc.message.from_wire(routing)
except DecodeError as err:
self.kill_socket(fd, sock)
sys.stderr.write("Routing decode error: %s\n" % err)
......@@ -232,9 +232,9 @@ class MsgQ:
def preparemsg(self, env, msg = None):
if type(env) == dict:
env = ISC.CC.message.to_wire(env)
env = isc.cc.message.to_wire(env)
if type(msg) == dict:
msg = ISC.CC.message.to_wire(msg)
msg = isc.cc.message.to_wire(msg)
length = 2 + len(env);
if msg:
length += len(msg)
......
......@@ -3,7 +3,7 @@
# This program collects 'counters' from 'statistics' channel.
# It accepts one command: 'Boss' group 'shutdown'
import ISC.CC
import isc.cc
import time
import select
import os
......@@ -103,7 +103,7 @@ def dump_stats(statpath, statcount, stat, statraw):
os.rename(statpath + '.new', statpath)
def collector(statgroup,step,statpath,statcount):
cc = ISC.CC.Session()
cc = isc.cc.Session()
if debug:
print ("cc.lname=",cc.lname)
cc.group_subscribe(statgroup)
......
#!/usr/bin/python
import ISC
cc = ISC.CC.Session()
import isc
cc = isc.cc.Session()
cc.group_subscribe("Boss")
cc.group_sendmsg({ "command":"shutdown"},"Boss")
......@@ -6,7 +6,7 @@
# One command is available
# "Boss" group: "shutdown"
import ISC
import isc
import time
import select
import random
......@@ -14,7 +14,7 @@ import random
step_time = 10
statgroup = "statistics"
cc = ISC.CC.Session()
cc = isc.cc.Session()
print (cc.lname)
#cc.group_subscribe(statgroup)
cc.group_subscribe("Boss")
......
import ISC.CC.message
from ISC.CC.session import *
import ISC.CC
import ISC.Util
SUBDIRS = CC Util
SUBDIRS = cc Util
PY_MODULES= __init__.py
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)/ISC
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)/isc
@(for _foo_ in $(PY_MODULES) ; \
do $(INSTALL) -m 0644 $(top_srcdir)/src/lib/cc/python/ISC/$$_foo_ $(DESTDIR)$(pyexecdir)/ISC/ ; done)
do $(INSTALL) -m 0644 $(top_srcdir)/src/lib/cc/python/isc/$$_foo_ $(DESTDIR)$(pyexecdir)/isc/ ; done)
PY_MODULES= __init__.py hexdump.py
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)/ISC/Util
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)/isc/Util
@(for _foo_ in $(PY_MODULES) ; \
do $(INSTALL) -m 0644 $(top_srcdir)/src/lib/cc/python/ISC/Util/$$_foo_ $(DESTDIR)$(pyexecdir)/ISC/Util/ ; done)
do $(INSTALL) -m 0644 $(top_srcdir)/src/lib/cc/python/isc/Util/$$_foo_ $(DESTDIR)$(pyexecdir)/isc/Util/ ; done)
from isc.Util.hexdump import *
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