Network Automation

Data Types

Integer – Used for whole numbers only, so without any decimals in between.
VLAN = 10

Float – Used with numbers AND decimal points.
Bandwidth_in_Mb = 10.1

String – Can use characters AND numbers together.
Router_Name = EMEAManchester

List – You can store multiple items in a list, the list of ‘items’ can be changed, added or removed.
Router_Type = [“ISR4k”, “Cat8000”, “ASR1k”]

Dictonary – Data stored in pairs, each pair will represent a key and a value.
Router_Details = {“router_name”: “CAT8kv”, “router_IP”, “192.168.1.1”}

Tuple – Similar to a list but the variables in the Tuple cannot be changed or modified.
Serial_Number = (FK123456789)

Boolean – It is either True or False, so within your Python script if the port interface is down then this represents false with the next action.
Interface_Down = False
Interface_Up = True

Set – Whatever is in the Set has to be unique and cannot be the same, for example a list of Serial Numbers which you know cannot be the same.
Serial_Number = {“FK123456789”, “SN123457789”}