summaryrefslogtreecommitdiff
path: root/vyroute/basic_function/Modifylo.py
diff options
context:
space:
mode:
authorhochikong <1097225749@qq.com>2016-08-21 19:37:29 +0800
committerhochikong <1097225749@qq.com>2016-08-21 19:37:29 +0800
commit655811f476a95b8eac2f65c78323a982d59eff1b (patch)
tree6aa2a938dfb73d1b185f56f026fbb519197a2bf3 /vyroute/basic_function/Modifylo.py
parent2584bea48c4c243fdf694cb21505bfbde6834a7f (diff)
downloadpython-vyos-mgmt-655811f476a95b8eac2f65c78323a982d59eff1b.tar.gz
python-vyos-mgmt-655811f476a95b8eac2f65c78323a982d59eff1b.zip
T133:Add a generic method set() and delete()
Rename the project Add set and delete method Rewrite README
Diffstat (limited to 'vyroute/basic_function/Modifylo.py')
-rw-r--r--vyroute/basic_function/Modifylo.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/vyroute/basic_function/Modifylo.py b/vyroute/basic_function/Modifylo.py
deleted file mode 100644
index ee247f0..0000000
--- a/vyroute/basic_function/Modifylo.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (c) 2016 Hochikong
-def modifylo(obj, lo_address):
- """This method provide a loopback address configuration function
-
- Parameter example:
- '1.1.1.1/32'
-
- :param obj: A connection object
- :param lo_address: The target address you want.Don't forget the netmask
- :return: A message or an error
- """
-
- lo_basic_configuration = "set interfaces loopback lo address %s"
-
- try:
- # Configure loopback interface lo address
- obj.sendline(lo_basic_configuration % lo_address)
- obj.prompt()
- if len(obj.before) > obj.before.index('\r\n') + 2:
- return obj.before
- else:
- return "Result : Add successfully."
- except Exception as e:
- return e