Former-commit-id:133dc97f67
[formerlya02aeb236c
] [formerly9f19e3f712
] [formerly133dc97f67
[formerlya02aeb236c
] [formerly9f19e3f712
] [formerly06a8b51d6d
[formerly9f19e3f712
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]]] Former-commit-id:06a8b51d6d
Former-commit-id:9bb8decbcf
[formerly8e80217e59
] [formerly377dcd10b9
[formerly3360eb6c5f
]] Former-commit-id:377dcd10b9
Former-commit-id:e2ecdcfe33
75 lines
No EOL
2.3 KiB
Python
75 lines
No EOL
2.3 KiB
Python
#!/usr/bin/env python
|
|
##
|
|
# This software was developed and / or modified by Raytheon Company,
|
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
|
#
|
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
|
# This software product contains export-restricted data whose
|
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
|
# to non-U.S. persons whether in the United States or abroad requires
|
|
# an export license or other authorization.
|
|
#
|
|
# Contractor Name: Raytheon Company
|
|
# Contractor Address: 6825 Pine Street, Suite 340
|
|
# Mail Stop B8
|
|
# Omaha, NE 68106
|
|
# 402.291.0100
|
|
#
|
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
|
# further licensing information.
|
|
##
|
|
|
|
import sys
|
|
import os
|
|
|
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.request import IscDataRecRequest
|
|
from dynamicserialize.dstypes.com.raytheon.uf.common.message import WsId
|
|
from dynamicserialize import DynamicSerializationManager
|
|
|
|
from ufpy import ThriftClient, ConfigFileUtil
|
|
|
|
#
|
|
# TODO: ADD DESCRIPTION
|
|
#
|
|
#
|
|
# SOFTWARE HISTORY
|
|
#
|
|
# Date Ticket# Engineer Description
|
|
# ------------ ---------- ----------- --------------------------
|
|
# 10/26/10 dgilling Initial Creation.
|
|
#
|
|
#
|
|
#
|
|
|
|
|
|
def main():
|
|
connectionParams = getConnectionParams()
|
|
|
|
try:
|
|
iscDataRequest = createRequest()
|
|
thriftClient = ThriftClient.ThriftClient(connectionParams["SVCBU_HOST"], int(connectionParams["CDSPORT"]), "/services")
|
|
serverResponse = thriftClient.sendRequest(iscDataRequest)
|
|
except Exception, e:
|
|
print "Unhandled exception thrown during iscDataRec processing: \n", str(e)
|
|
sys.exit(1)
|
|
|
|
if (not serverResponse.isOkay()):
|
|
print "Errors occurred during iscDataRec processing: ", serverResponse.message()
|
|
sys.exit(1)
|
|
|
|
def getConnectionParams():
|
|
return ConfigFileUtil.parseKeyValueFile(os.path.join(sys.path[0], "../ServiceBackup/configuration/svcbu.properties"))
|
|
|
|
def createRequest():
|
|
obj = IscDataRecRequest()
|
|
|
|
wsId = WsId(progName="iscDataRec")
|
|
|
|
obj.setWorkstationID(wsId)
|
|
obj.setSiteID("")
|
|
obj.setArgString(" ".join(sys.argv[1:]))
|
|
return obj
|
|
|
|
if __name__ == '__main__':
|
|
main()
|
|
|