Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Interface Reset Capability #134

Closed
ImJustJosh opened this issue Sep 22, 2021 · 0 comments
Closed

Add Interface Reset Capability #134

ImJustJosh opened this issue Sep 22, 2021 · 0 comments

Comments

@ImJustJosh
Copy link
Contributor

ImJustJosh commented Sep 22, 2021

I started working to add Interface Reset Capability to the Python APIs. Here is what I got working. hopefully this will be easy to add.

def post_reset_interface(self, device_ip, vpn_id, ifname):
    """Reset an Interface
    Args:
        device_ip (str): device IP for device object
        vpn_id (int): VPN Id for Interface
        ifname (str): Interface name to reset
    """

    url = f"{self.base_url}device/tools/reset/interface/{device_ip}"
    payload = f"{{'vpnId':'{vpn_id}','ifname':'{ifname}'}}"
    response = HttpMethods(self.session, url).request('POST', payload=payload)
    result = ParseMethods.parse_status(response)
    return result

#134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant