interfacegroup = [InterfaceGroup('as2-border', 
                                 interfaces = [Interface('as2border1','GigabitEthernet2/0'), 
                                               Interface('as2border2', 'GigabitEthernet2/0')])]
refbook = ReferenceBook(name='border', interfaceGroups= interfacegroup)

bf.put_reference_book(refbook)


"""
Explanation: Using Reference Books
Reference book allows users to create groups of information that can be used in Batfish queries. They can contain:

InterfaceGroup
AddressGroup

| Name           | Description                | Type                                                                                           |
|----------------|----------------------------|------------------------------------------------------------------------------------------------|
| name           | Name of the reference book | str                                                                                            |
| addressGroup   | A list of addressGroups    | List of addressGroup     |
| interfaceGroup | A list of interfaceGroups  | List of interfaceGroup |
Example usage
Create a reference book for information about border routers and add an InterfaceGroup for the as2 border interfaces
End of explanation
"""


refbook = bf.get_reference_book('border')
addressGroup = [
    AddressGroup(name='as2-border', addresses = ['2.12.21.1', '2.12.12.1'])
]

refbook.addressGroups.extend(addressGroup)
bf.put_reference_book(refbook)

bf.get_reference_book('border')

"""
Explanation: Example usage
Add an AddressGroup for the IP addresses of all as2 border interfaces to the ReferenceBook('border')
End of explanation
"""


