Skip to content

Commit

Permalink
Extends bp/windows-support submission 98383
Browse files Browse the repository at this point in the history
Move support for PoSH-Ohai into its own provider module.
Raise UnsupportedPlatform exceptions in ohai_solo.py
when the client is non-linux, and raise the same
exception in posh_ohai.py when the client is non-windows.

Define a unicode function via utils.py which is python2
and python3 compatible. Replace the unicode function
previously defined in ohai_solo.py with this.

Many style fixes, and trimming some code.
Fixes test_dns.py from change in python-whois.
Updates pep8 requirement from jcrocholl/pep8 Issue#240:
    Fix was merged into pep8 1.5.7
Updates hacking requirement to fix VersionConflict

Change-Id: I0b33d632d157d5219bfee25b669408885f03b873
Implements: blueprint windows-support
  • Loading branch information
stavxyz committed Jul 11, 2014
1 parent bf2028d commit 269da49
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 402 deletions.
2 changes: 1 addition & 1 deletion satori/common/templating.py
Expand Up @@ -116,7 +116,7 @@ def parse(template, extra_globals=None, env_vars=None, **kwargs):

try:
result = template.render(**minimum_kwargs)
#TODO(zns): exceptions in Jinja template sometimes missing traceback
# TODO(zns): exceptions in Jinja template sometimes missing traceback
except jinja2.TemplateError as exc:
LOG.error(exc, exc_info=True)
error_message = "Template had an error: %s" % exc
Expand Down
8 changes: 4 additions & 4 deletions satori/discovery.py
Expand Up @@ -55,10 +55,10 @@ def run(target, config=None, interactive=False):
hostname = dns.parse_target_hostname(target)
found['hostname'] = hostname
ip_address = six.text_type(dns.resolve_hostname(hostname))
#TODO(sam): Use ipaddress.ip_address.is_global
# " .is_private
# " .is_unspecified
# " .is_multicast
# TODO(sam): Use ipaddress.ip_address.is_global
# .is_private
# .is_unspecified
# .is_multicast
# To determine address "type"
if not ipaddress.ip_address(ip_address).is_loopback:
try:
Expand Down
311 changes: 0 additions & 311 deletions satori/pse.py

This file was deleted.

2 changes: 1 addition & 1 deletion satori/smb.py
Expand Up @@ -95,7 +95,7 @@ def __init__(self, host, password=None, username="Administrator",
self.ssh_tunnel = None
self._substituted_command = None

#creating temp file to talk to _process with
# creating temp file to talk to _process with
self._file_write = tempfile.NamedTemporaryFile()
self._file_read = open(self._file_write.name, 'r')

Expand Down

0 comments on commit 269da49

Please sign in to comment.