Skip to content

Commit 1716a62

Browse files
committed
Finished python script
1 parent 1bdd96f commit 1716a62

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

01-iosxr-02-cli-automation-python/ztp_python/configure_ospf_bgp.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def get_hostname(self):
4444
return ""
4545

4646

47-
def configure_ospf(self) {
47+
def configure_ospf(self):
4848

4949
ospf_config = """!
5050
router ospf ztp-python
@@ -75,10 +75,9 @@ def configure_ospf(self) {
7575
print("Failed to apply OSPF configuration")
7676
print("Error : "+str(e))
7777
return False
78-
}
7978

8079

81-
def configure_bgp(asn=None, hostname=None) {
80+
def configure_bgp(asn=None, hostname=None):
8281

8382
hostname = self.get_hostname()
8483

@@ -121,10 +120,9 @@ def configure_bgp(asn=None, hostname=None) {
121120
print("Error : "+str(e))
122121
os.remove("/tmp/bgp_config")
123122
return False
124-
}
125123

126124

127-
def configure_loopback(self) {
125+
def configure_loopback(self):
128126

129127
hostname = self.get_hostname()
130128

@@ -155,8 +153,6 @@ def configure_loopback(self) {
155153
print("Error : "+str(e))
156154
return False
157155

158-
}
159-
160156

161157
if __name__ == "__main__":
162158

0 commit comments

Comments
 (0)