[Python-modules-commits] [txwinrm] 06/09: merge patched into master
Christopher Stuart Hoskin
mans0954 at moszumanska.debian.org
Sat Feb 25 15:24:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
mans0954 pushed a commit to branch master
in repository txwinrm.
commit 0c558fc4df418485a9aaf26c4ce7409241ad580e
Merge: 53c4122 5387a17
Author: Christopher Hoskin <mans0954 at debian.org>
Date: Sat Feb 25 13:34:51 2017 +0000
merge patched into master
README.rst | 94 ++++++++-
debian/.git-dpm | 6 +-
...lls-pykerberos-kerberos-we-want-the-defau.patch | 4 +-
debian/patches/0002-Fix-tests.patch | 14 +-
debian/patches/0003-Wecutil-Argument-Bug.patch | 2 +-
setup.py | 2 +-
txwinrm/SessionManager.py | 101 +++++----
txwinrm/WinRMClient.py | 227 ++++++++++++++++++---
txwinrm/app.py | 8 +-
txwinrm/associate.py | 97 +++++++++
txwinrm/enumerate.py | 9 +-
txwinrm/krb5.py | 213 +++++++++++++------
txwinrm/request/command.xml | 6 +-
txwinrm/request/create.xml | 8 +-
txwinrm/request/delete.xml | 6 +-
txwinrm/request/enumerate.xml | 2 +-
txwinrm/request/event_pull.xml | 6 +-
txwinrm/request/pull.xml | 2 +-
txwinrm/request/receive.xml | 6 +-
txwinrm/request/send.xml | 6 +-
txwinrm/request/signal.xml | 6 +-
txwinrm/request/subscribe.xml | 6 +-
txwinrm/request/unsubscribe.xml | 6 +-
txwinrm/shell.py | 4 +-
txwinrm/test/test_connection_info.py | 80 ++++++++
txwinrm/util.py | 55 ++++-
26 files changed, 768 insertions(+), 208 deletions(-)
diff --cc debian/.git-dpm
index fbd216b,0000000..780a896
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
+# see git-dpm(1) from git-dpm package
- 95628c8f92ff972d4af0b4031e9003beb493626c
- 95628c8f92ff972d4af0b4031e9003beb493626c
- 6e679d0ea3d9e9250c3535d60d472ff2ff17bc19
++5387a17e0d17a170ce480bff33a0fa2e34bbef2c
++5387a17e0d17a170ce480bff33a0fa2e34bbef2c
++82c0f6be59bfc0d73db331c87a09eb2b6e14f6d0
+82c0f6be59bfc0d73db331c87a09eb2b6e14f6d0
+txwinrm_1.2.7.orig.tar.gz
+dcb24afb99a6c3486fa284ce87901b2158a6afda
+292596
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/0001-Upstream-calls-pykerberos-kerberos-we-want-the-defau.patch
index 8d02f55,0000000..c8510c5
mode 100644,000000..100644
--- a/debian/patches/0001-Upstream-calls-pykerberos-kerberos-we-want-the-defau.patch
+++ b/debian/patches/0001-Upstream-calls-pykerberos-kerberos-we-want-the-defau.patch
@@@ -1,22 -1,0 +1,22 @@@
- From a9567d65d183976976e03157150edfef5c262aa9 Mon Sep 17 00:00:00 2001
++From 443dc3ecee4d502469a6f0a2e536bfc371186c61 Mon Sep 17 00:00:00 2001
+From: Christopher Hoskin <christopher.hoskin at gmail.com>
+Date: Fri, 29 Jul 2016 21:43:39 +0100
+Subject: Upstream calls pykerberos kerberos, we want the default name
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
- index c261752..74f5501 100755
++index b0b2ba7..2287270 100755
+--- a/setup.py
++++ b/setup.py
+@@ -29,7 +29,7 @@ setup_kwargs = dict(
+
+ try:
+ from setuptools import setup
+- setup_kwargs['install_requires'] = ['twisted', 'kerberos', 'pyOpenSSL']
++ setup_kwargs['install_requires'] = ['twisted', 'pykerberos', 'pyOpenSSL']
+ try:
+ import argparse
+ if False:
diff --cc debian/patches/0002-Fix-tests.patch
index 4291483,0000000..dad3351
mode 100644,000000..100644
--- a/debian/patches/0002-Fix-tests.patch
+++ b/debian/patches/0002-Fix-tests.patch
@@@ -1,122 -1,0 +1,122 @@@
- From 9b3c1c508e6a49c8b4af79bfc1116f9e2857167d Mon Sep 17 00:00:00 2001
++From 58694f63ac79cb866dde696da175c59ee232363a Mon Sep 17 00:00:00 2001
+From: Christopher Hoskin <christopher.hoskin at gmail.com>
+Date: Fri, 29 Jul 2016 21:46:55 +0100
+Subject: Fix tests
+
+---
+ setup.py | 1 +
+ txwinrm/enumerate.py | 8 ++++----
+ txwinrm/test/test_shell.py | 12 ++++++++----
+ 3 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/setup.py b/setup.py
- index 74f5501..d85b7aa 100755
++index 2287270..8de0704 100755
+--- a/setup.py
++++ b/setup.py
+@@ -20,6 +20,7 @@ setup_kwargs = dict(
+ url='https://github.com/zenoss/txwinrm',
+ packages=['txwinrm', 'txwinrm.request'],
+ package_data={'txwinrm.request': ['*.xml']},
++ test_suite='txwinrm.test',
+ scripts=[
+ 'scripts/winrm',
+ 'scripts/winrs',
+diff --git a/txwinrm/enumerate.py b/txwinrm/enumerate.py
- index 26a92d7..3b2cb31 100644
++index 8e379cb..78b3d50 100755
+--- a/txwinrm/enumerate.py
++++ b/txwinrm/enumerate.py
- @@ -322,7 +322,7 @@ class TextBufferingContentHandler(sax.handler.ContentHandler):
++@@ -325,7 +325,7 @@ class TextBufferingContentHandler(sax.handler.ContentHandler):
+ This implementation saves the text from the buffer. Then it resets and
+ truncates the buffer.
+ """
+- self._text = self._buffer.getvalue()
++ self._text = self._buffer.getvalue().decode('utf-8')
+ self._reset_truncate()
+
+ def characters(self, content):
- @@ -332,7 +332,7 @@ class TextBufferingContentHandler(sax.handler.ContentHandler):
++@@ -335,7 +335,7 @@ class TextBufferingContentHandler(sax.handler.ContentHandler):
+
+ This implementation writes to the buffer.
+ """
+- self._buffer.write(content)
++ self._buffer.write(content.encode('utf-8'))
+
+ def _reset_truncate(self):
+ self._buffer.reset()
- @@ -596,7 +596,7 @@ class ItemsContentHandler(sax.handler.ContentHandler):
++@@ -599,7 +599,7 @@ class ItemsContentHandler(sax.handler.ContentHandler):
+ This instance manipulates the tag stack, creating a new instance if
+ it's length is 1. Saves value as None if the nil attribute is present.
+ """
+- log.debug('ItemsContentHandler startElementNS {0} v="{1}" t="{2}" {3}'
++ log.debug(u'ItemsContentHandler startElementNS {0} v="{1}" t="{2}" {3}'
+ .format(name, self._value, self._text_buffer.text,
+ self._tag_stack))
+ tag = create_tag_comparer(name)
- @@ -621,7 +621,7 @@ class ItemsContentHandler(sax.handler.ContentHandler):
++@@ -624,7 +624,7 @@ class ItemsContentHandler(sax.handler.ContentHandler):
+ the text as a date and saves it for later use when the properties
+ element is closed.
+ """
+- log.debug('ItemsContentHandler endElementNS {0} v="{1}" t="{2}" {3}'
++ log.debug(u'ItemsContentHandler endElementNS {0} v="{1}" t="{2}" {3}'
+ .format(name, self._value, self._text_buffer.text,
+ self._tag_stack))
+ tag = create_tag_comparer(name)
+diff --git a/txwinrm/test/test_shell.py b/txwinrm/test/test_shell.py
+index 245a187..7210ea4 100644
+--- a/txwinrm/test/test_shell.py
++++ b/txwinrm/test/test_shell.py
+@@ -16,6 +16,7 @@ from .tools import create_get_elem_func
+ from ..shell import _build_command_line_elem, _stripped_lines, \
+ _find_shell_id, _find_command_id, _find_stream, _find_exit_code, \
+ CommandResponse, SingleShotCommand, LongRunningCommand, Typeperf
++from ..util import EtreeRequestSender, ConnectionInfo
+
+ DATADIR = os.path.join(
+ os.path.dirname(os.path.abspath(__file__)), "data_shell")
+@@ -36,6 +37,7 @@ class FakeRequestSender(object):
+
+ hostname = 'fake_host'
+ _receive_resp = 'receive_resp_01.xml'
++ _conn_info = ConnectionInfo("10.30.50.34", "kerberos", "rbooth at SOLUTIONS.LOC", "", "http", 5985, "Keep-Alive", "/home/zenoss/rbooth.keytab", '')
+
+ def send_request(self, request_template_name, **kwargs):
+ elem = None
+@@ -50,8 +52,10 @@ class FakeRequestSender(object):
+ elem = get_elem(self._receive_resp)
+ self._receive_resp = 'receive_resp_02.xml'
+
+- return defer.succeed(elem)
++ return defer.returnValue(elem)
+
++ def close_connections(self):
++ return defer.succeed(None)
+
+ class TestBuildCommandLineElem(unittest.TestCase):
+
+@@ -148,7 +152,7 @@ class TestSingleShotCommand(unittest.TestCase):
+
+ @defer.inlineCallbacks
+ def test_run_command(self):
+- command = SingleShotCommand(FakeRequestSender())
++ command = SingleShotCommand(EtreeRequestSender(FakeRequestSender()))
+ cmd_response = yield command.run_command('foo')
+ self.assertEqual(cmd_response.exit_code, 0)
+ self.assertEqual(cmd_response.stderr, [])
+@@ -163,7 +167,7 @@ class TestSingleShotCommand(unittest.TestCase):
+ class TestLongRunningCommand(unittest.TestCase):
+
+ def setUp(self):
+- self._command = LongRunningCommand(FakeRequestSender())
++ self._command = LongRunningCommand(EtreeRequestSender(FakeRequestSender()))
+
+ def tearDown(self):
+ self._command = None
+@@ -202,7 +206,7 @@ class TestLongRunningCommand(unittest.TestCase):
+ class TestTypeperf(unittest.TestCase):
+
+ def setUp(self):
+- self._command = Typeperf(LongRunningCommand(FakeRequestSender()))
++ self._command = Typeperf(LongRunningCommand(EtreeRequestSender(FakeRequestSender())))
+
+ def tearDown(self):
+ self._command = None
diff --cc debian/patches/0003-Wecutil-Argument-Bug.patch
index 9c28b29,0000000..2dde4c6
mode 100644,000000..100644
--- a/debian/patches/0003-Wecutil-Argument-Bug.patch
+++ b/debian/patches/0003-Wecutil-Argument-Bug.patch
@@@ -1,24 -1,0 +1,24 @@@
- From 95628c8f92ff972d4af0b4031e9003beb493626c Mon Sep 17 00:00:00 2001
++From 5387a17e0d17a170ce480bff33a0fa2e34bbef2c Mon Sep 17 00:00:00 2001
+From: Christopher Hoskin <christopher.hoskin at gmail.com>
+Date: Sat, 30 Jul 2016 09:47:09 +0100
+Subject: Wecutil Argument Bug
+
+---
+ txwinrm/wecutil.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/txwinrm/wecutil.py b/txwinrm/wecutil.py
+index e456e14..d6a0e34 100644
+--- a/txwinrm/wecutil.py
++++ b/txwinrm/wecutil.py
+@@ -90,8 +90,8 @@ class WecutilStrategy(object):
+ class WecUtility(app.ConfigDrivenUtility):
+
+ def add_args(self, parser):
+- parser.add_argument("--path", "-p", default='Application')
+- parser.add_argument("--select", "-s", default='*')
++ parser.add_argument("--path", "-t", default='Application')
++ parser.add_argument("--select", "-e", default='*')
+ parser.add_argument("--num-pulls", "-n", type=int, default=2)
+
+ def check_args(self, args):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/txwinrm.git
More information about the Python-modules-commits
mailing list