Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] OpenVMS #54731

Open
wants to merge 22 commits into
base: devel
from

Conversation

Projects
None yet
4 participants
@noci2012
Copy link

commented Apr 2, 2019

SUMMARY

Work in progress: build Support for OpenVMS, using DCL command across a SSH session.

  • recognizing DCL scripts (if they need to land on ansible host), not sure yet.
  • adjust SSH to be able to connect to OpenVMS (use_tty issue).
  • DCL is a different command language. No "shell" program, it is always resident.
ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

OpenVMS

ADDITIONAL INFORMATION

Still untested, first pointers are needed to some to be expected issues to solve:

  • Quoting, DCL doesn't do Quoting like Unix. "........" = String 'variable' = Variable expansion ''variable' is variable expansion inside a string. escaping a "in a string = "" (" with quote ""quote"" ")
  • filenames: consist of REMOTE-SYSTEM::DEVICE:[DIRECTORY.SUB...]FILENAME.TYPE;VERSION
  • Remote system may be of forms: REMOTENODE or REMOTENODE"username" REMOTENODE"username password" (it may be a logical containing this)
  • DEVICE a disk name or a logical refering to one
  • DIRECTORY a directory tree intersperced with . character delimited with either [ ] or < >.
  • FILENAME, TYPE etc. like other systems,
  • VERSION a number 1..32767 (-1 = previous version, 0 = current version, -0 is oldest version)
    A logical is a kernel based namespace of translations for various objects in the system.
  • DIRECTORYNAMES, FILENAME & FILETYPE can be 39 characters long on most systems, complete path 255 characters. (All ASCII, Byte sized, uppercase only + $ & _, * and % are used as wildcards).
  • There is a filesystem that allows Mixed case, and longer elements. ^is used to escape special characters in that space.

Location for temporary files: SYS$SCRATCH:

Become (SUDO, RUNAS etc. not supported, then use a different logon).

Is Python on the target required? 2.7 is available if needed.

@@ -260,7 +260,7 @@
version_added: '2.7'
use_tty:
version_added: '2.5'
default: 'yes'
default: 'yes' forced to no for OpenVMS

This comment has been minimized.

Copy link
@bcoca

bcoca Apr 2, 2019

Member

dont add comments to default values, this breaks default processing

This comment has been minimized.

Copy link
@noci2012

noci2012 Apr 2, 2019

Author

updated.

# return new_cmd

## needed for? if checksums need to be crateds then until now: CRC/MD5 is possible with native tooling
## I know HPE left something (Maintenance..) out the last few years.

This comment has been minimized.

Copy link
@bcoca

bcoca Apr 2, 2019

Member

this was used for basic file comparison, mostly the stat module now takes care of this

This comment has been minimized.

Copy link
@noci2012

noci2012 Apr 2, 2019

Author

so it can go away.

This comment has been minimized.

Copy link
@noci2012

noci2012 Apr 2, 2019

Author

removed.

elif module_substyle == 'dcl':
# Start of DCL support
# shebang needs to start with $!....
shebang = u'$!'

This comment has been minimized.

Copy link
@bcoca

bcoca Apr 2, 2019

Member

or we can move 'shebang' detection to the shell module (might also help with powershell @nitzmahone @jborean93 ?)

Nico Baggus
@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Apr 2, 2019

The test ansible-test sanity --test pylint [explain] failed with 2 errors:

test/units/executor/module_common/test_modify_module.py:10:0: syntax-error Cannot import 'ansible.executor.module_common' due to syntax error 'unindent does not match any outer indentation level (&lt;unknown&gt;, line 947)'
test/units/executor/module_common/test_recursive_finder.py:32:0: syntax-error Cannot import 'ansible.executor.module_common' due to syntax error 'unindent does not match any outer indentation level (&lt;unknown&gt;, line 947)'

The test ansible-test sanity --test pylint [explain] failed with 7 errors:

lib/ansible/executor/module_common.py:947:0: syntax-error unindent does not match any outer indentation level (&lt;unknown&gt;, line 947)
lib/ansible/plugins/action/__init__.py:22:0: syntax-error Cannot import 'ansible.executor.module_common' due to syntax error 'unindent does not match any outer indentation level (&lt;unknown&gt;, line 947)'
lib/ansible/plugins/connection/ssh.py:466:30: bad-whitespace Exactly one space required after comma         if getattr(self._shell,"_IS_OPENVMS", False):                               ^
lib/ansible/plugins/connection/ssh.py:1261:0: missing-final-newline Final newline missing
lib/ansible/plugins/shell/dcl.py:39:28: bad-whitespace Exactly one space required after assignment     _SHELL_REDIRECT_ALLNULL =  '\nsts = $STATUS\nDEFINE/USER SYS$OUTPUT NL:\nDEFINE/USER SYS$ERROR NL:\n$STATUS = sts'                             ^
lib/ansible/plugins/shell/dcl.py:58:0: missing-final-newline Final newline missing
test/sanity/validate-modules/main.py:40:0: syntax-error Cannot import 'ansible.executor.module_common' due to syntax error 'unindent does not match any outer indentation level (&lt;unknown&gt;, line 947)'

The test ansible-test sanity --test compile --python 2.6 [explain] failed with 1 error:

lib/ansible/executor/module_common.py:947:32: SyntaxError: elif module_substyle == 'dcl':

The test ansible-test sanity --test compile --python 2.7 [explain] failed with 1 error:

lib/ansible/executor/module_common.py:947:32: SyntaxError: elif module_substyle == 'dcl':

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

lib/ansible/executor/module_common.py:947:32: SyntaxError: elif module_substyle == 'dcl':

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

lib/ansible/executor/module_common.py:947:32: SyntaxError: elif module_substyle == 'dcl':

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

lib/ansible/executor/module_common.py:947:32: SyntaxError: elif module_substyle == 'dcl':

The test ansible-test sanity --test compile --python 3.8 [explain] failed with 1 error:

lib/ansible/executor/module_common.py:947:32: SyntaxError: elif module_substyle == 'dcl':

The test ansible-test sanity --test pep8 [explain] failed with 7 errors:

lib/ansible/executor/module_common.py:67:18: W605 invalid escape sequence '\$'
lib/ansible/executor/module_common.py:947:2: E901 IndentationError: unindent does not match any outer indentation level
lib/ansible/plugins/connection/ssh.py:466:31: E231 missing whitespace after ','
lib/ansible/plugins/connection/ssh.py:1261:32: W292 no newline at end of file
lib/ansible/plugins/shell/dcl.py:31:5: E265 block comment should start with '# '
lib/ansible/plugins/shell/dcl.py:39:30: E222 multiple spaces after operator
lib/ansible/plugins/shell/dcl.py:58:96: W292 no newline at end of file

click here for bot help

Nico Baggus added some commits Apr 2, 2019

Nico Baggus
Nico Baggus
\$ cannot be used as escape..., replaced with $, als name consistency…
…, REPLACER_OPENVMS in stead of REPLACER_VMS.
Nico Baggus
Nico Baggus
@noci2012

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

current fails are problems with two (not three as in the header) test environments.
Appearantly some files could not be downloaded.
https://app.shippable.com/github/ansible/ansible/runs/117254/summary/console

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Apr 3, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:79:0: syntax-error inconsistent use of tabs and spaces in indentation (&lt;unknown&gt;, line 79)

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.8 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test docs-build [explain] failed with 4 errors:

docs/docsite/rst/plugins/shell.rst:36:0: toc-tree-glob-pattern-no-match: toctree glob pattern 'shell/*' didn't match any documents
docs/docsite/rst/reference_appendices/faq.rst:208:0: undefined-label: undefined label: csh_shell (if the link has no caption the label must precede a section header)
docs/docsite/rst/reference_appendices/faq.rst:208:0: undefined-label: undefined label: fish_shell (if the link has no caption the label must precede a section header)
docs/docsite/rst/reference_appendices/faq.rst:208:0: undefined-label: undefined label: powershell_shell (if the link has no caption the label must precede a section header)

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:79:23: SyntaxError: remote = None

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:79:23: SyntaxError: remote = None

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:79:23: SyntaxError: remote = None

The test ansible-test sanity --test compile --python 3.8 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:79:23: SyntaxError: remote = None

The test ansible-test sanity --test pep8 [explain] failed with 88 errors:

lib/ansible/plugins/shell/dcl.py:10:34: W291 trailing whitespace
lib/ansible/plugins/shell/dcl.py:21:36: W291 trailing whitespace
lib/ansible/plugins/shell/dcl.py:39:5: E303 too many blank lines (2)
lib/ansible/plugins/shell/dcl.py:79:5: E101 indentation contains mixed spaces and tabs
lib/ansible/plugins/shell/dcl.py:79:5: W191 indentation contains tabs
lib/ansible/plugins/shell/dcl.py:80:5: E101 indentation contains mixed spaces and tabs
lib/ansible/plugins/shell/dcl.py:80:5: W191 indentation contains tabs
lib/ansible/plugins/shell/dcl.py:81:25: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:81:34: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:87:26: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:87:26: E117 over-indented
lib/ansible/plugins/shell/dcl.py:89:26: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:89:26: E117 over-indented
lib/ansible/plugins/shell/dcl.py:95:25: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:95:34: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:99:25: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:99:34: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:101:16: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:102:16: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:104:16: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:104:24: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:105:16: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:107:16: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:107:25: E222 multiple spaces after operator
lib/ansible/plugins/shell/dcl.py:109:25: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:109:34: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:111:16: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:113:25: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:113:34: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:115:16: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:117:25: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:117:34: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:119:48: W291 trailing whitespace
lib/ansible/plugins/shell/dcl.py:120:28: E226 missing whitespace around arithmetic operator
lib/ansible/plugins/shell/dcl.py:120:32: E226 missing whitespace around arithmetic operator
lib/ansible/plugins/shell/dcl.py:129:17: E265 block comment should start with '# '
lib/ansible/plugins/shell/dcl.py:132:17: E265 block comment should start with '# '
lib/ansible/plugins/shell/dcl.py:139:21: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:139:26: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:139:32: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:139:39: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:139:51: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:139:58: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:140:22: E231 missing whitespace after ':'
lib/ansible/plugins/shell/dcl.py:140:32: E231 missing whitespace after ':'
lib/ansible/plugins/shell/dcl.py:140:43: E231 missing whitespace after ':'
lib/ansible/plugins/shell/dcl.py:141:23: E231 missing whitespace after ':'
lib/ansible/plugins/shell/dcl.py:145:27: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:147:36: E226 missing whitespace around arithmetic operator
lib/ansible/plugins/shell/dcl.py:148:17: E201 whitespace after '['
lib/ansible/plugins/shell/dcl.py:148:26: E202 whitespace before ']'
lib/ansible/plugins/shell/dcl.py:150:43: E201 whitespace after '['
lib/ansible/plugins/shell/dcl.py:150:51: E221 multiple spaces before operator
lib/ansible/plugins/shell/dcl.py:150:63: E202 whitespace before ']'
lib/ansible/plugins/shell/dcl.py:151:43: E201 whitespace after '['
lib/ansible/plugins/shell/dcl.py:151:45: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:151:56: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:151:63: E202 whitespace before ']'
lib/ansible/plugins/shell/dcl.py:151:65: W291 trailing whitespace
lib/ansible/plugins/shell/dcl.py:152:17: E221 multiple spaces before operator
lib/ansible/plugins/shell/dcl.py:152:43: E201 whitespace after '['
lib/ansible/plugins/shell/dcl.py:152:45: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:152:56: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:152:63: E202 whitespace before ']'
lib/ansible/plugins/shell/dcl.py:153:25: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:153:46: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:156:18: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:156:28: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:158:33: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:158:38: E226 missing whitespace around arithmetic operator
lib/ansible/plugins/shell/dcl.py:158:60: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:160:33: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:160:38: E226 missing whitespace around arithmetic operator
lib/ansible/plugins/shell/dcl.py:160:60: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:162:33: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:162:38: E226 missing whitespace around arithmetic operator
lib/ansible/plugins/shell/dcl.py:162:60: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:163:1: W293 blank line contains whitespace
lib/ansible/plugins/shell/dcl.py:165:18: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:165:28: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:167:19: E225 missing whitespace around operator
lib/ansible/plugins/shell/dcl.py:167:37: E225 missing whitespace around operator
lib/ansible/plugins/shell/dcl.py:170:21: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:170:28: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:170:43: E225 missing whitespace around operator
lib/ansible/plugins/shell/dcl.py:175:21: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:175:28: E231 missing whitespace after ','
lib/ansible/plugins/shell/dcl.py:175:38: E231 missing whitespace after ','

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:79:23: python-syntax-error inconsistent use of tabs and spaces in indentation (<unknown>, line 79)

click here for bot help

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Apr 3, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:78:0: syntax-error inconsistent use of tabs and spaces in indentation (&lt;unknown&gt;, line 78)

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.8 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test docs-build [explain] failed with 4 errors:

docs/docsite/rst/plugins/shell.rst:36:0: toc-tree-glob-pattern-no-match: toctree glob pattern 'shell/*' didn't match any documents
docs/docsite/rst/reference_appendices/faq.rst:208:0: undefined-label: undefined label: csh_shell (if the link has no caption the label must precede a section header)
docs/docsite/rst/reference_appendices/faq.rst:208:0: undefined-label: undefined label: fish_shell (if the link has no caption the label must precede a section header)
docs/docsite/rst/reference_appendices/faq.rst:208:0: undefined-label: undefined label: powershell_shell (if the link has no caption the label must precede a section header)

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:78:23: SyntaxError: remote = None

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:78:23: SyntaxError: remote = None

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:78:23: SyntaxError: remote = None

The test ansible-test sanity --test compile --python 3.8 [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:78:23: SyntaxError: remote = None

The test ansible-test sanity --test pep8 [explain] failed with 15 errors:

lib/ansible/plugins/shell/dcl.py:78:5: E101 indentation contains mixed spaces and tabs
lib/ansible/plugins/shell/dcl.py:78:5: W191 indentation contains tabs
lib/ansible/plugins/shell/dcl.py:79:8: E101 indentation contains mixed spaces and tabs
lib/ansible/plugins/shell/dcl.py:79:8: W191 indentation contains tabs
lib/ansible/plugins/shell/dcl.py:106:16: E111 indentation is not a multiple of four
lib/ansible/plugins/shell/dcl.py:106:25: E222 multiple spaces after operator
lib/ansible/plugins/shell/dcl.py:147:17: E201 whitespace after '['
lib/ansible/plugins/shell/dcl.py:147:26: E202 whitespace before ']'
lib/ansible/plugins/shell/dcl.py:149:43: E201 whitespace after '['
lib/ansible/plugins/shell/dcl.py:149:50: E221 multiple spaces before operator
lib/ansible/plugins/shell/dcl.py:150:44: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:150:55: E202 whitespace before ')'
lib/ansible/plugins/shell/dcl.py:151:17: E221 multiple spaces before operator
lib/ansible/plugins/shell/dcl.py:151:44: E201 whitespace after '('
lib/ansible/plugins/shell/dcl.py:151:55: E202 whitespace before ')'

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:78:23: python-syntax-error inconsistent use of tabs and spaces in indentation (<unknown>, line 78)

click here for bot help

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Apr 3, 2019

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

lib/ansible/plugins/shell/dcl.py:78:25: trailing-whitespace Trailing whitespace
lib/ansible/plugins/shell/dcl.py:106:24: bad-whitespace Exactly one space required after assignment                 dirpath =  []                         ^
lib/ansible/plugins/shell/dcl.py:151:18: bad-whitespace Exactly one space required before assignment             user  = 'U' + self.prot_table[(mode &gt;&gt; 6) &amp; 0o007]                   ^

The test ansible-test sanity --test pep8 [explain] failed with 3 errors:

lib/ansible/plugins/shell/dcl.py:78:26: W291 trailing whitespace
lib/ansible/plugins/shell/dcl.py:106:26: E222 multiple spaces after operator
lib/ansible/plugins/shell/dcl.py:151:17: E221 multiple spaces before operator

click here for bot help

noci2012 and others added some commits Apr 4, 2019

noci2012
Change 'sleep 0' to support multiple architectures.
Start working on changing /bin/sh -c {QUOTED_COMMAND} into {UNQUOTED COMMANDS}
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Apr 4, 2019

The test ansible-test sanity --test pylint [explain] failed with 7 errors:

lib/ansible/plugins/action/__init__.py:1048:97: bad-whitespace No space allowed before bracket                 cmd = self._connection._shell.append_command(cmd, self._connection._shell.sleep0 )                                                                                                  ^
lib/ansible/plugins/action/__init__.py:1051:72: bad-whitespace Exactly one space required after comma                     cmd = 'WRITE SYS$OUTPUT "Exec=%s"\n%s' % (executable,cmd)                                                                         ^
lib/ansible/plugins/shell/__init__.py:50:0: syntax-error inconsistent use of tabs and spaces in indentation (&lt;unknown&gt;, line 50)
lib/ansible/plugins/shell/csh.py:7:0: syntax-error Cannot import 'ansible.plugins.shell' due to syntax error 'inconsistent use of tabs and spaces in indentation (&lt;unknown&gt;, line 50)'
lib/ansible/plugins/shell/dcl.py:60:0: syntax-error inconsistent use of tabs and spaces in indentation (&lt;unknown&gt;, line 60)
lib/ansible/plugins/shell/powershell.py:28:0: syntax-error Cannot import 'ansible.plugins.shell' due to syntax error 'inconsistent use of tabs and spaces in indentation (&lt;unknown&gt;, line 50)'
lib/ansible/plugins/shell/sh.py:19:0: syntax-error Cannot import 'ansible.plugins.shell' due to syntax error 'inconsistent use of tabs and spaces in indentation (&lt;unknown&gt;, line 50)'

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with the error:

Command "ansible-doc -t shell cmd csh dcl fish powershell sh" returned exit status 250.
>>> Standard Error
ERROR! Unexpected Exception, this is probably a bug: inconsistent use of tabs and spaces in indentation (__init__.py, line 50)

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with the error:

Command "ansible-doc -t shell cmd csh dcl fish powershell sh" returned exit status 250.
>>> Standard Error
ERROR! Unexpected Exception, this is probably a bug: inconsistent use of tabs and spaces in indentation (__init__.py, line 50)

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with the error:

Command "ansible-doc -t shell cmd csh dcl fish powershell sh" returned exit status 250.
>>> Standard Error
ERROR! Unexpected Exception, this is probably a bug: inconsistent use of tabs and spaces in indentation (__init__.py, line 50)

The test ansible-test sanity --test ansible-doc --python 3.8 [explain] failed with the error:

Command "ansible-doc -t shell cmd csh dcl fish powershell sh" returned exit status 250.
>>> Standard Error
ERROR! Unexpected Exception, this is probably a bug: inconsistent use of tabs and spaces in indentation (__init__.py, line 50)

The test ansible-test sanity --test docs-build [explain] failed with 4 errors:

docs/docsite/rst/plugins/shell.rst:36:0: toc-tree-glob-pattern-no-match: toctree glob pattern 'shell/*' didn't match any documents
docs/docsite/rst/reference_appendices/faq.rst:208:0: undefined-label: undefined label: csh_shell (if the link has no caption the label must precede a section header)
docs/docsite/rst/reference_appendices/faq.rst:208:0: undefined-label: undefined label: fish_shell (if the link has no caption the label must precede a section header)
docs/docsite/rst/reference_appendices/faq.rst:208:0: undefined-label: undefined label: powershell_shell (if the link has no caption the label must precede a section header)

The test ansible-test sanity --test action-plugin-docs [explain] failed with 1 error:

lib/ansible/plugins/action/dcl.py:0:0: action plugin has no matching module to provide documentation

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 2 errors:

lib/ansible/plugins/shell/__init__.py:50:25: SyntaxError: self.sleep0 = 'sleep 0'
lib/ansible/plugins/shell/dcl.py:60:19: SyntaxError: self.shell = None

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 2 errors:

lib/ansible/plugins/shell/__init__.py:50:25: SyntaxError: self.sleep0 = 'sleep 0'
lib/ansible/plugins/shell/dcl.py:60:19: SyntaxError: self.shell = None

The test ansible-test sanity --test compile --python 3.8 [explain] failed with 2 errors:

lib/ansible/plugins/shell/__init__.py:50:25: SyntaxError: self.sleep0 = 'sleep 0'
lib/ansible/plugins/shell/dcl.py:60:19: SyntaxError: self.shell = None

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 2 errors:

lib/ansible/plugins/shell/__init__.py:50:25: SyntaxError: self.sleep0 = 'sleep 0'
lib/ansible/plugins/shell/dcl.py:60:19: SyntaxError: self.shell = None

The test ansible-test sanity --test pep8 [explain] failed with 10 errors:

lib/ansible/plugins/action/__init__.py:1048:97: E202 whitespace before ')'
lib/ansible/plugins/action/__init__.py:1050:19: E271 multiple spaces after keyword
lib/ansible/plugins/action/__init__.py:1051:73: E231 missing whitespace after ','
lib/ansible/plugins/shell/__init__.py:50:1: E101 indentation contains mixed spaces and tabs
lib/ansible/plugins/shell/__init__.py:50:1: W191 indentation contains tabs
lib/ansible/plugins/shell/__init__.py:52:1: E101 indentation contains mixed spaces and tabs
lib/ansible/plugins/shell/dcl.py:60:1: E101 indentation contains mixed spaces and tabs
lib/ansible/plugins/shell/dcl.py:60:1: W191 indentation contains tabs
lib/ansible/plugins/shell/dcl.py:61:1: W191 indentation contains tabs
lib/ansible/plugins/shell/dcl.py:62:1: E101 indentation contains mixed spaces and tabs

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/plugins/shell/dcl.py:60:19: python-syntax-error inconsistent use of tabs and spaces in indentation (<unknown>, line 60)

click here for bot help

@nitzmahone

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

Hey @noci2012 - we've been kicking around different ideas for pluggable runtime module assembly behaviors for awhile now, and this would definitely fall into that category.

Without that in place, I'm all for integrating the minor tweaks necessary to make custom modules runnable on OpenVMS, but we'd probably reject explicit core engine support for code sharing on OpenVMS modules, or shipping the connection/shell plugins for it. We're unable to test it, and we've rejected requests in the past for shared code support for other languages (eg perl, ruby). With the new collections support in 2.8 making it easier to ship broader support packages like this outside the Ansible distribution, we'll likely start making the bar for what gets shipped "in the box" much higher.

Once a couple of the tweaks have been merged, everything but the module replacer/shared-code-assembly support can be done locally without modification to Ansible via custom plugins (and even easier/more transparently with the new collections support in 2.8). You'd just have to duplicate the shared code in each module for now- we'd treat it like a binary module.

Pluggable module assembly will be on the 2.9 roadmap (as it's something that's generally necessary for a lot of different areas), but no promises on availability.

@noci2012

This comment has been minimized.

Copy link
Author

commented Apr 4, 2019

@nitzmahone
FYI, I am not an experienced Python programmer, not deeply acquainted to ansible as such, i do see it could be very useful though. esp when VSI delivers OpenVMS for x86_64.

So how should i read your comment like: Quit doing what i am doing atm as it is a road to nowhere.? [ now is a time i may spend some time on it, that window will pass surely in a few months as i am in between projects ].

I am not sure how the ansible engine can become usable without some work on it.
Biggest problem now is: OpenVMS has no (unix alike) Shell. So how to do discovery, collect data, ....
quoting is radically different. command -v... not availabe, show symbol is probably closest to it.
(many commands are available using symbols, aka shell variables more or less like alias).
Then it also has quite different settings, commands syntax...
Filename: DEVICE:[dir.subdir]filename.type;version
Protections: S[ystem]:RWED,O[wner]:RWED,G[roup]:RWED,W[orld]:RWED
chmod 644 somefile -> SET FILE/PROTECT=(S:RWD,O:RWD,G:R,W:R) somefile
chown john otherfile.x -> SET FILE/OWNER=JOHN otherfile.x
(or combined: SET FILE/OWNER=JOHN/PROT=S:RWD,O:RWD,G:R,W:R) somefile,otherfile.x )
Files cannot be quoted neither other parameters.

I found out today that multiline input won't cut it using the SSH EXEC interface.
The closest might be a PIPE command which can handle a unix style command line to some extend and with quite some limitations... pipe command ; command ; command / pipe command | command | command... >, < are possible, >/dev/null should become >NL: unix path's can be used inside perl/python/c programs (with some quirks) but not in DCL commands.
Here PIPE "could be seen " as a shell, only the -c needs to go.

Quoting needs to be done DCL style, command line length is limited on older version of OpenVMS to 1KB and recent version can handle 4KB. (after expansion of all variables). (pre V7.0 are even more limited).

I am definitely open to advice how to proceed.

wrt. test machines that might be solvable....? I can ask about possbilities next Wed. Apr 10 about those.

@noci2012

This comment has been minimized.

Copy link
Author

commented Apr 8, 2019

@nitzmahone
I tried to read up on "Ansible Pluggable Module Assembly" it just isn't something i can find in the documentation. A google search refers to the Glossary because the words Module, Pluggable & Assembly all are there, just not in one sentence.
Any pointers?

@bcoca bcoca removed the needs_triage label Apr 9, 2019

noci2012 added some commits Apr 15, 2019

noci2012
noci2012
noci2012

noci2012 added some commits Apr 18, 2019

noci2012
noci2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.