Esempio n. 1
0
    def connect_VistA(self, test_suite_details):
        """
        Generic method to connect to VistA. Intended to be used by the ATF Recorder.
        """
        if test_suite_details.remote_conn_details:
            location = test_suite_details.remote_conn_details.remote_address
        else:
            location = "127.0.0.1"
        from OSEHRAHelper import ConnectToMUMPS, PROMPT

        try:
            VistA = ConnectToMUMPS(
                logfile=test_suite_details.result_dir + "/" + self.testname + ".txt",
                instance=test_suite_details.instance,
                namespace=test_suite_details.namespace,
                location=location,
                remote_conn_details=test_suite_details.remote_conn_details,
            )
        except ImportError as ex:
            print ex
            raise

        if test_suite_details.username != "":
            test_suite_details.password = os.getenv("CACHE_PASSWORD", "")
            VistA.wait("Username")
            VistA.write(test_suite_details.username)
            VistA.wait("Password")
            VistA.write(test_suite_details.password)

        if VistA.type is not None and VistA.type == "cache" and test_suite_details.namespace != "":
            try:
                VistA.ZN(test_suite_details.namespace)
            except IndexError, no_namechange:
                pass
            VistA.wait(PROMPT)
Esempio n. 2
0
    def connect_VistA(self, test_suite_details):
        '''
        Generic method to connect to VistA. Intended to be used by the ATF Recorder.
        '''
        if test_suite_details.remote_conn_details:
            location = test_suite_details.remote_conn_details.remote_address
        else:
            location = '127.0.0.1'
        from OSEHRAHelper import ConnectToMUMPS, PROMPT
        try:
            VistA = ConnectToMUMPS(
                logfile=test_suite_details.result_dir + '/' + self.testname +
                '.txt',
                instance=test_suite_details.instance,
                namespace=test_suite_details.namespace,
                location=location,
                remote_conn_details=test_suite_details.remote_conn_details)
        except ImportError as ex:
            print ex
            raise

        if test_suite_details.username != '':
            test_suite_details.password = os.getenv('CACHE_PASSWORD', '')
            VistA.wait("Username")
            VistA.write(test_suite_details.username)
            VistA.wait("Password")
            VistA.write(test_suite_details.password)

        if VistA.type is not None and VistA.type == 'cache' and test_suite_details.namespace != '':
            try:
                VistA.ZN(test_suite_details.namespace)
            except IndexError, no_namechange:
                pass
            VistA.wait(PROMPT)
Esempio n. 3
0
from OSEHRAHelper import ConnectToMUMPS,PROMPT

VistA=ConnectToMUMPS(sys.argv[1],sys.argv[3],sys.argv[4])
if (sys.argv[5] and sys.argv[6]):
  VistA.login(sys.argv[5],sys.argv[6])
if VistA.type=='cache':
  try:
    VistA.ZN(sys.argv[4])
  except IndexError,no_namechange:
    pass

if sys.argv[8]=='ON':
  VistA.wait(PROMPT)
  VistA.startCoverage()
VistA.wait(PROMPT)
VistA.write('K ^XUTL("XQ",$J)')
VistA.write('D ^XINDEX')
if VistA.type == 'cache':
  VistA.wait('No =>')
  VistA.write('No')
arglist = sys.argv[2].split(',')
for routine in arglist:
  VistA.wait('Routine:')
  VistA.write(routine)
VistA.wait('Routine:')
VistA.write('')
selectionList = ['Select BUILD NAME:',
                 'Select INSTALL NAME:',
                 'Select PACKAGE NAME:']
while True:
  index = VistA.multiwait(selectionList)
from OSEHRAHelper import ConnectToMUMPS, PROMPT

VistA = ConnectToMUMPS(sys.argv[1], sys.argv[3], sys.argv[4])
if sys.argv[5] and sys.argv[6]:
    VistA.login(sys.argv[5], sys.argv[6])
if VistA.type == "cache":
    try:
        VistA.ZN(sys.argv[4])
    except IndexError, no_namechange:
        pass

if sys.argv[8] == "ON":
    VistA.wait(PROMPT)
    VistA.startCoverage()
VistA.wait(PROMPT)
VistA.write('K ^XUTL("XQ",$J)')
VistA.write("D ^XINDEX")
if VistA.type == "cache":
    VistA.wait("No =>")
    VistA.write("No")
arglist = sys.argv[2].split(",")
for routine in arglist:
    VistA.wait("Routine:")
    VistA.write(routine)
VistA.wait("Routine:")
VistA.write("")
selectionList = ["Select BUILD NAME:", "Select INSTALL NAME:", "Select PACKAGE NAME:"]
while True:
    index = VistA.multiwait(selectionList)
    VistA.write("")
    if index == len(selectionList) - 1:
Esempio n. 5
0
import sys
sys.path = [sys.argv[7] + '/lib/vista'] + sys.path

from OSEHRAHelper import ConnectToMUMPS, PROMPT

VistA = ConnectToMUMPS(sys.argv[1], sys.argv[3], sys.argv[4])
if (sys.argv[5] and sys.argv[6]):
    VistA.login(sys.argv[5], sys.argv[6])
if VistA.type == 'cache':
    try:
        VistA.ZN(sys.argv[4])
    except IndexError, no_namechange:
        pass
VistA.wait(PROMPT)
VistA.write('K ^XUTL("XQ",$J)')
VistA.write('D ^XINDEX')
if VistA.type == 'cache':
    VistA.wait('No =>')
    VistA.write('No')
arglist = sys.argv[2].split(',')
for routine in arglist:
    VistA.wait('Routine:')
    VistA.write(routine)
VistA.wait('Routine:')
VistA.write('')
selectionList = [
    'Select BUILD NAME:', 'Select INSTALL NAME:', 'Select PACKAGE NAME:'
]
while True:
    index = VistA.multiwait(selectionList)
    VistA.write('')
Esempio n. 6
0
def ZTMGRSET():
    VistA = ConnectToMUMPS(LOGFILE)
    VistA.wait(PROMPT)
    VistA.write('D ^ZTMGRSET')
    while True:
        index = VistA.multiwait(['Should I continue?', 'System:'])
        if index == 0:
            VistA.write('YES')
            continue
        if index == 1:
            break
    # After choosing GTM (8), will see:
    #    'I will now rename a group of routines specific to your operating system
    VistA.write('8')
    # MANAGER's
    VistA.wait('NAME OF')
    VistA.write(TEST_VISTA_SETUP_UCI_NAME + "," + TEST_VISTA_SETUP_VOLUME_SET)
    # PRODUCTION SIGN ON
    VistA.wait('PRODUCTION')
    VistA.write(TEST_VISTA_SETUP_UCI_NAME + "," + TEST_VISTA_SETUP_VOLUME_SET)
    # VOLUME SET must match one used in PRODUCTION
    VistA.wait('NAME OF')
    VistA.write(TEST_VISTA_SETUP_VOLUME_SET)
    # Accept /tmp
    VistA.wait('The temp directory for the system')
    VistA.write('')
    # last step - Now to load routines common to all systems.
    VistA.wait('Want to rename the FileMan routines: No//')
    VistA.write('YES')
    VistA.wait(PROMPT, 200)