11# -*- coding: utf-8 -*-
2- """Define ServiceNow events."""
2+ """Define Migration events."""
33from __future__ import annotations
44
55import json
1010import boto3
1111
1212
13- class ServiceNowStateHandler :
13+ class MigrationStateHandler :
1414 sqs = None
1515
1616 def update_state (self , state : str , machine_name : str , ** kwargs ) -> bool :
@@ -19,22 +19,22 @@ def update_state(self, state: str, machine_name: str, **kwargs) -> bool:
1919
2020 print ("Event queue: " + os .environ .get ("event_queue" ))
2121 queue_url = os .environ .get ("event_queue" )
22- state_obj = ServiceNowState (state , machine_name , ** kwargs )
22+ state_obj = MigrationState (state , machine_name , ** kwargs )
2323 print (
2424 sqs .send_message (
2525 QueueUrl = queue_url , MessageBody = json .dumps (state_obj .state_dict )
2626 )
2727 )
2828
2929
30- class ServiceNowException (Exception ):
31- """Define the structure of a ServiceNow exception."""
30+ class MigrationException (Exception ):
31+ """Define the structure of a Migration exception."""
3232
3333 pass
3434
3535
36- class ServiceNowState :
37- """Define the structure of a ServiceNow state."""
36+ class MigrationState :
37+ """Define the structure of a Migration state."""
3838
3939 state_dict = {}
4040
@@ -66,7 +66,7 @@ class ServiceNowState:
6666 def __init__ (self , state : str , machine_name : str = "NA" , ** kwargs ) -> None :
6767 """Initialize the State."""
6868 if state not in self .STATES :
69- raise ServiceNowException (f"State: { state } is unrecognized!" )
69+ raise MigrationException (f"State: { state } is unrecognized!" )
7070
7171 self .machine_name : str = machine_name .upper ()
7272 self .state : str = state
0 commit comments