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 support for saving config #342

Closed
jlongstaf opened this issue Apr 14, 2016 · 0 comments
Closed

Add support for saving config #342

jlongstaf opened this issue Apr 14, 2016 · 0 comments

Comments

@jlongstaf
Copy link
Contributor

Need to save BIG-IP configuration. Using the BIG-IP REST API, POST JSON {'command': 'save'} to /sys/config. Here's the complete implementation from LBaaS v1:

def save_config(self):
    """ Save the bigip configuration """
    request_url = self.bigip.icr_url + '/sys/config'
    payload = dict()
    payload['command'] = 'save'
    response = self.bigip.icr_session.post(
        request_url, data=json.dumps(payload),
        timeout=const.CONNECTION_TIMEOUT)
    if response.status_code < 400:
        return True
    else:
        Log.error('config', response.text)
        raise exceptions.BigIPClusterConfigSaveFailure(response.text)
    return False
@swormke swormke self-assigned this Apr 14, 2016
swormke added a commit to swormke/f5-common-python that referenced this issue Apr 15, 2016
Issues:
Fixes F5Networks#342

Problem:
Need to save BIG-IP configuration. Using the BIG-IP REST API, POST JSON {'command': 'save'} to /sys/config.

Analysis:
* Added a new sys/Config module as an UnnamedResource
* Added a save method to the new module
* Added tests

Tests:
* Flake8
* Unit
* Functional
jlongstaf added a commit that referenced this issue Apr 15, 2016
caphrim007 pushed a commit to caphrim007/f5-common-python that referenced this issue Aug 2, 2016
Issues:
Fixes F5Networks#342

Problem:
Need to save BIG-IP configuration. Using the BIG-IP REST API, POST JSON {'command': 'save'} to /sys/config.

Analysis:
* Added a new sys/Config module as an UnnamedResource
* Added a save method to the new module
* Added tests

Tests:
* Flake8
* Unit
* Functional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants