Project

General

Profile

Tests for release v0_3

Technical documentation
02/08/2012

Units Test results for Exemption_Notifier v0_3

[vbravov@tissue-dev Exemption_Notifier]$ ./test_exmp_notifier.sh -d
Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d --exmp_id=2,221,544,117,221,57 --expireInDays=10 --expireInWeeks=2

This_test_for_mutuallyExclusiveOptions
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpId'] = 2,221,544,117,221,57
self._argDict['expireInDays'] = 10
self._argDict['expireInWeeks'] = 2
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template ====================================================================

Mutually Exclusive Options: --expire_in_weeks and --expire_in_days
Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d -f --system_name=gkljhlk,TEVATRONSHUTDOWNVIDEONETWORK,dughsg --expireInDays=10

This_test_for_not_allowed_flag
-------------------------------------------------------------
option -f not recognized
Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d -n --mail_to= --expireInDays=10

This_test_for_suppress__key_and_email_to_options
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['mailTo'] =
self._argDict['n'] = 1
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template ====================================================================

Mutually Exclusive Options: --n and --mail_to
Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d -n --expireInDays=10 --mail_cc=

This_test_for_suppress__key_and_email_cc_options
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['mailCc'] =
self._argDict['n'] = 1
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template ====================================================================

Mutually Exclusive Options: --n and --mail_cc
Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d -v --exmp_anytype=notype --expire_in_days=10

This_test_for_not_allowed_options
-------------------------------------------------------------
option --exmp_anytype not recognized
Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d --exmp_behavior=eb -v --mail_to=

This_test_for_mustHaveOneOfOptions
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpBehavior'] = eb
self._argDict['interfaceReturns'] = type
self._argDict['mailTo'] =
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template
self._argDict['v'] = 1 ====================================================================

Must specify at least one of : --expireInDays=<value> OR --expireInWeeks=<value>
Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d --exmp_behavior=no_AG -v --expire_in_days=af

This_test_for_restrictedTypeOptions
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpBehavior'] = no_AG
self._argDict['expireInDays'] = af
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template
self._argDict['v'] = 1 ====================================================================

Value of --expire_in_days must be convertible to DataType('int')
Value of --expire-in-days must be convertible to DataType('int')
Value of --expireInDays must be convertible to DataType('int')
Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d --exmp_id=2,221,544,117,221,57 -v --expireInWeeks=2

This_test_for_exemption_id_list_with_inventory_key.The_list_includes_wrong_ID
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpId'] = 2,221,544,117,221,57
self._argDict['expireInWeeks'] = 2
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template
self._argDict['v'] = 1 ====================================================================
Debug message-> Debugging is turned on

Debug message-> Number of days or weeks received and converted to days

Debug message-> Inventory is turned on

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with exemption_id =2,221,544,117,221,57;
There is no - 544 found in requested exemptions list.
Debug message-> Number of exemptions is: 5 ;

Debug message-> Checking exemptions which are expared in 14 days

Debug message-> Start checkig expiration date for exemptions

Exemption for: exmp_id = 2 ; System name= CMSFTS3 ; will be expired in 110 days exemp_type= ISSUE .
Exemption for: exmp_id = 221 ; System name= DSG-TC1 ; will be expired in 110 days exemp_type= ISSUE .
Exemption for: exmp_id = 117 ; System name= F-S-NETMGR-1 ; will be expired in 110 days exemp_type= ISSUE .
Exemption for: exmp_id = 221 ; System name= DSG-TC1 ; will be expired in 110 days exemp_type= ISSUE .
Exemption for: exmp_id = 57 ; System name= HYPER-DC4 ; will be expired in 110 days exemp_type= ISSUE .
Debug message-> Number of expired exemptions is: 0
There is no any expired exemption in the exemptions list. Nothing to do.

Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d -v --system_name=gkljhlk,TEVATRONSHUTDOWNVIDEONETWORK,dughsg --expireInDays=10

This_test_for_system
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['systemName'] = gkljhlk,TEVATRONSHUTDOWNVIDEONETWORK,dughsg
self._argDict['template'] = ./bin/email_template
self._argDict['v'] = 1 ====================================================================
Debug message-> Debugging is turned on

Debug message-> Inventory is turned on

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with: name==gkljhlk,TEVATRONSHUTDOWNVIDEONETWORK,dughsg ;

There is no - GKLJHLK found in requested exemptions list.
There is no - DUGHSG found in requested exemptions list.
Debug message-> Number of exemptions is: 1 ;

Debug message-> Checking exemptions which are expared in 10 days

Debug message-> Start checkig expiration date for exemptions

Exemption for: exmp_id = 237 ; System name= TEVATRONSHUTDOWNVIDEONETWORK ; will be expired in 122 days exemp_type= SCAN  E-mail will be sent
Debug message
> Number of expired exemptions is: 1

Debug message-> E-MAIL Function
Debug message-> System found - system_id=354826. Start getting e-mail address from MISCOMP.

Debug message-> First primary admin of the system found.- e-mail=

Debug message-> Sending e-mail for expired exemption with exemption Id 237

Debug message-> From nobody Mon Feb 6 10:57:45 2012
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Tissue exemption is about to expire
From:
To:

The Tissue exemption # 237 for system TEVATRONSHUTDOWNVIDEONETWORK is about to expire.
The exemption expiration date is: 2011-10-07
It is time to renew the exemption request for this system by going to:
https://tissue.fnal.gov/tissue/showExemptionRequests/
If the exemption expires your system will no longer have access to particular sevice or resource.
If you need help, please contact the Fermilab Service Desk at 630-840-2345 or
via the web at servicedesk.fnal.gov (email: ).

Thank you.

E-mail was sent to    *******E-mail  was not sent, because send function was commented out.

Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d -n --system_name=gkljhlk,TEVATRONSHUTDOWNVIDEONETWORK,dughsg --expireInDays=10

This_test_for_suppress_email_key.The_same_test_as_before_But_e-mail_suppressed
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['n'] = 1
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['systemName'] = gkljhlk,TEVATRONSHUTDOWNVIDEONETWORK,dughsg
self._argDict['template'] = ./bin/email_template ====================================================================
Debug message-> Debugging is turned on

Debug message-> Suppress notification is turned on

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with: name==gkljhlk,TEVATRONSHUTDOWNVIDEONETWORK,dughsg ;

There is no - GKLJHLK found in requested exemptions list.
There is no - DUGHSG found in requested exemptions list.
Debug message-> Number of exemptions is: 1 ;

Debug message-> Checking exemptions which are expared in 10 days

Debug message-> Start checkig expiration date for exemptions

Debug message-> Number of expired exemptions is: 1

Debug message-> E-MAIL Function
Debug message-> System found - system_id=354826. Start getting e-mail address from MISCOMP.

Debug message-> First primary admin of the system found.- e-mail=

Debug message-> Sending e-mail for expired exemption with exemption Id 237

Debug message-> From nobody Mon Feb 6 10:57:50 2012
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Tissue exemption is about to expire
From:
To:

The Tissue exemption # 237 for system TEVATRONSHUTDOWNVIDEONETWORK is about to expire.
The exemption expiration date is: 2011-10-07
It is time to renew the exemption request for this system by going to:
https://tissue.fnal.gov/tissue/showExemptionRequests/
If the exemption expires your system will no longer have access to particular sevice or resource.
If you need help, please contact the Fermilab Service Desk at 630-840-2345 or
via the web at servicedesk.fnal.gov (email: ).

Thank you.

Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d -v --exmp_type=b --expire_in_days=10

This_test_for_exemption_type_and_inventory_list
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpType'] = b
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template
self._argDict['v'] = 1 ====================================================================
Debug message-> Debugging is turned on

Debug message-> Inventory is turned on

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with: exemption_type=B;

Debug message-> Number of exemptions is: 8 ;

Debug message-> Checking exemptions which are expared in 10 days

Debug message-> Start checkig expiration date for exemptions

Exemption for: exmp_id = 231 ; System name= KDC CLUSTER ; will be expired in 220 days exemp_type= WL .
Exemption for: exmp_id = 230 ; System name= FERMISCANNERFARM ; will be expired in 220 days exemp_type= WL .
Exemption for: exmp_id = 250 ; System name= AD-SERVERS ; will be expired in 269 days exemp_type= WL .
Exemption for: exmp_id = 247 ; System name= NETLOG ; will be expired in 269 days exemp_type= WL .
Exemption for: exmp_id = 248 ; System name= OUTLAND ; will be expired in 269 days exemp_type= WL .
Exemption for: exmp_id = 249 ; System name= OUTBACK ; will be expired in 269 days exemp_type= WL .
Exemption for: exmp_id = 246 ; System name= CHABLIS ; will be expired in 269 days exemp_type= WL .
Exemption for: exmp_id = 232 ; System name= BLOCKWHITELIST ; will be expired in 3143 days exemp_type= WL .
Debug message-> Number of expired exemptions is: 0
There is no any expired exemption in the exemptions list. Nothing to do.

Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d -v --exmp_type=notype --expire_in_days=10

This_test_for_not_valid_exemption_type
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpType'] = notype
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template
self._argDict['v'] = 1 ====================================================================
Debug message-> Debugging is turned on

Debug message-> Inventory is turned on

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with: exemption_type=NOTYPE;

Error message-> There is no exemption type: NOTYPE found in requested exemptions list.
Debug message-> Number of exemptions is: 0 ;

There is no any exemption in the exemptions list. Nothing to do.

Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d --exmp_behavior=eb -v --expire_in_days=10

This_test_for_not_valid_exemption_behavior
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpBehavior'] = eb
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template
self._argDict['v'] = 1 ====================================================================
Debug message-> Debugging is turned on

Debug message-> Inventory is turned on

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with: exemptiom behavior= EB.

There is no exemption behavior:  EB found in requested exemptions list.
Debug message-> Number of exemptions is: 0 ;
There is no any exemption in the exemptions list. Nothing to do.

Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d --exmp_behavior=no_AG -v --expire_in_days=10

This_test_for_exemption_behavior_with_inventory
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpBehavior'] = no_AG
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template
self._argDict['v'] = 1 ====================================================================
Debug message-> Debugging is turned on

Debug message-> Inventory is turned on

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with: exemptiom behavior= NO_AG.

Debug message-> Number of exemptions is: 2 ;

Debug message-> Checking exemptions which are expared in 10 days

Debug message-> Start checkig expiration date for exemptions

Exemption for: exmp_id = 234 ; System name= D0PLYCM5 ; will be expired in 237 days exemp_type= SCAN .
Exemption for: exmp_id = 233 ; System name= S19659 ; will be expired in 237 days exemp_type= SCAN .
Debug message-> Number of expired exemptions is: 0
There is no any expired exemption in the exemptions list. Nothing to do.

Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d --template=./new_template --exmp_type=s --expire_in_days=10

This_test_for_new_template_in_CLI_command
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpType'] = s
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./new_template ====================================================================
Debug message-> Debugging is turned on

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with: exemption_type=S;

Debug message-> Number of exemptions is: 6 ;

Debug message-> Checking exemptions which are expared in 10 days

Debug message-> Start checkig expiration date for exemptions

Debug message-> Number of expired exemptions is: 1

Debug message-> E-MAIL Function
Debug message-> System found - system_id=354826. Start getting e-mail address from MISCOMP.

Debug message-> First primary admin of the system found.- e-mail=

Debug message-> Sending e-mail for expired exemption with exemption Id 237

Debug message-> From nobody Mon Feb 6 10:58:14 2012
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Tissue exemption is about to expire
From:
To:

The Tissue exemption is 237
The System name is TEVATRONSHUTDOWNVIDEONETWORK
The expiration date is 2011-10-07
+++++++++++++++++++++++++++++++++

E-mail was sent to  *******E-mail  was not sent, because send function was commented out.

Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d --mail_to= --exmp_type=s --expire_in_days=10

This_test_for_e-mail_to_in_CLI_command
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpType'] = s
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['mailTo'] =
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template ====================================================================
Debug message-> Debugging is turned on

Debug message-> E-MAIL_TO is defined from CLI

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with: exemption_type=S;

Debug message-> Number of exemptions is: 6 ;

Debug message-> Checking exemptions which are expared in 10 days

Debug message-> Start checkig expiration date for exemptions

Debug message-> Number of expired exemptions is: 1

Debug message-> E-MAIL Function
Debug message-> System found - system_id=354826. Start getting e-mail address from MISCOMP.

Debug message-> First primary admin of the system found.- e-mail=

Debug message-> Sending e-mail for expired exemption with exemption Id 237

Debug message-> From nobody Mon Feb 6 10:58:20 2012
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Tissue exemption is about to expire
From:
To:

The Tissue exemption # 237 for system TEVATRONSHUTDOWNVIDEONETWORK is about to expire.
The exemption expiration date is: 2011-10-07
It is time to renew the exemption request for this system by going to:
https://tissue.fnal.gov/tissue/showExemptionRequests/
If the exemption expires your system will no longer have access to particular sevice or resource.
If you need help, please contact the Fermilab Service Desk at 630-840-2345 or
via the web at servicedesk.fnal.gov (email: ).

Thank you.

E-mail was sent to  *******E-mail  was not sent, because send function was commented out.

Testing with Debug messages.

------------Arguments and parameters fo testing -------------

-d --mail_cc= --exmp_type=s --expire_in_days=10

This_test_for_e-mail_CC_in_CLI_command
------------------------------------------------------------- ====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['d'] = 1
self._argDict['exmpType'] = s
self._argDict['expireInDays'] = 10
self._argDict['interfaceReturns'] = type
self._argDict['mailCc'] =
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition()
self._argDict['template'] = ./bin/email_template ====================================================================
Debug message-> Debugging is turned on

Debug message-> E-mail template is defined.

Debug message-> Query the requested exemptions

====================================================================
Parsed command Arguments:
self._argDict['args'] = []
self._argDict['host'] = http://tissue-dev.fnal.gov/
self._argDict['interfaceReturns'] = type
self._argDict['syntaxDefinition'] = CommandSyntaxDefinition(query exemptions)
self._argDict['tissueHost'] = http://tissue-dev.fnal.gov/
self._argDict['tissueWebHost'] = http://tissue-dev.fnal.gov/
self._argDict['webHost'] = http://tissue-dev.fnal.gov/ ====================================================================
Debug message-> All exemptions received.Numrber of exemptions is 265

Debug message-> Checking all exemptions with: exemption_type=S;

Debug message-> Number of exemptions is: 6 ;

Debug message-> Checking exemptions which are expared in 10 days

Debug message-> Start checkig expiration date for exemptions

Debug message-> Number of expired exemptions is: 1

Debug message-> E-MAIL Function
Debug message-> System found - system_id=354826. Start getting e-mail address from MISCOMP.

Debug message-> First primary admin of the system found.- e-mail=

Debug message-> Sending e-mail for expired exemption with exemption Id 237

Debug message-> From nobody Mon Feb 6 10:58:25 2012
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Tissue exemption is about to expire
From:
To:
Cc:

The Tissue exemption # 237 for system TEVATRONSHUTDOWNVIDEONETWORK is about to expire.
The exemption expiration date is: 2011-10-07
It is time to renew the exemption request for this system by going to:
https://tissue.fnal.gov/tissue/showExemptionRequests/
If the exemption expires your system will no longer have access to particular sevice or resource.
If you need help, please contact the Fermilab Service Desk at 630-840-2345 or
via the web at servicedesk.fnal.gov (email: ).

Thank you.

E-mail was sent to  *******E-mail  was not sent, because send function was commented out.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Here is a real test for e-mail send-function , which shows that the send- function is capable to send SMTP message
from the host.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-bash-4.1$ python mail.py
From nobody Mon Feb 6 10:51:58 2012
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: The contents of textfile
From:
To:
Cc:

This message is the test message for sending mail from Exemption Notifier.
To anyone who is a primary admin or owner of the system whch the exemption is going to expired.
So let's check ,how it works.
Also we need to check how it can be formatted as a MIME-Text message.

Thanks

Vladimir

Files