8000 GitHub - chrismatthews/pydpxapi
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chrismatthews/pydpxapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pydpxapi

This Module enables you to get data from the Catalogic DPX Backup Software Database using the method of the Command line interface 'syncui' for accessing different modules. At the moment this is limited to readonly access only of the modules ssdatmgr & sssched

Dependancy:

Python 2.7
subprocess, re, os, time, logging < all standard modules
asciitable < https://github.com/taldcroft/asciitable

Examples:

Example 1: Print the results from "node list"

import pydpxapi

SSPRODIR = 'c:/DPX'
dpx_User = 'sysadmin'
dpx_Pass = 'sysadmin'
dpx_Master = '192.168.74.20' # IP Address or DNS Name of the Master Server

x = pydpxapi.api.DPX_syncui(SSPRODIR, dpx_Master, dpx_User, dpx_Pass)
x.dpx_node_list()
print x.node_list


Example 2: For each "job list" output the destinations 

x = pydpxapi.api.DPX_syncui(SSPRODIR, dpx_Master, dpx_User, dpx_Pass)
x.dpx_job_list()
x.all_jobdest = []
for job in x.job_list:
    if re.match('BACKUP', job['type']):
        joblist = job['job']
        backuptype = job['type']
        x.dpx_job_getdest(joblist, backuptype)
        x.all_jobdest.append(dict(job=joblist, type=backuptype, destinations=x.jobdestinations))

print x.all_jobdest # Print returned Dictionary

# to show you how to printout from the dictionary
for job in x.all_jobdest:
    print "Job:", job['job'], "\tType:", job['type']
    for dest in job['destinations']:
        print 'Nodename:', dest['nodeName'], \
            '\tSource:', dest['source'], \
            '\tDestination Devicecluster:', dest['destination_devicecluster'], \
            '\tDestination Device:', dest['destination_device']
    print "----------------------------------------------"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0