Skip to content

verify_adapter_gateways: Week 7 Lab #8

@jwasserzug

Description

@jwasserzug
NOTES:
    - In the first database assignment, you created a function called
      verify_gateway_ip_port that verified in CMDB if the specified gateway
      ip and port are valid.
    - In the second database assignment, you created a function called
      get_all_adapters_gateway_info that retrieved adapter info from ISEApps DB.
INSTRUCTIONS:
    1. Create a new function called verify_adapter_gateways and do the following
       inside this new function.
    2. Create a variable to keep track of overall success or failure
    3. Call get_all_adapters_gateway_info to get dictionary of adapters.
       Dictionary will look like:
         { "1": AdapterInfo(),
           "2": AdapterInfo(),...
         }
       Where each AdapterInfo object has these five attributes:
         adapter_id
         primary_gateway_node
         primary_gateway_port
         backup_gateway_node 
         backup_gateway_port 
    4. Store that return value in a variable
    5. Create a foreach loop to loop through the values in the dictionary
    6. Inside this loop, call verify_gateway_ip_port for each node and port pair
       NOTE! The ip/nodes are stored differently in CMDB vs ISEApps DB. In CMDB
       the node is stored as FQDN (tc-oat02.test.ise.com) but in ISEApps DB they
       are stored as just tc-oat02. Modify the node you pass in to
       verify_gateway_ip_port, which is the one that came from ISEApps DB so
       that you provide a FQDN. So just append ".test.ise.com" to the string
       before calling the function. Append using plus operator (+)
    7. verify_gateway_ip_port will return True if node and port are valid and
       False if they are not
    8. For each check, print a success or failure statement
    9. Return True if all adapters are configured correctly, False otherwise

@vraghunandan @bdambola @kwokman @dsapienza @DRozentsvay @gganeshan @cbautista1002 @xingj53 @wcorrea @rklotz @isehgu @akbamaa

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions