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

Implement hosting account management functionality #147

Merged

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Aug 23, 2024

This pull request was created by Sweep to resolve the following request by @curtisdelicata:

Automated service provisioning, suspension, and termination of web hosting accounts firstly supportig cPanel API.

Continue chatting at https://sweep-chat-demo.vercel.app/c/c9b01d5c-b88b-4a43-a7a5-68e8351ed4c2.

Purpose

This pull request implements the core functionality for managing hosting accounts, including provisioning, suspending, unsuspending, upgrading, and terminating accounts. It also adds logging and error handling to ensure reliable and robust account management.

Description

The changes in this pull request include:

  1. In the HostingService class:

    • Added provisionAccount, suspendAccount, unsuspendAccount, upgradeAccount, and terminateAccount methods to handle the corresponding account management operations.
    • Implemented the logic to interact with the control panel clients (cPanel, Plesk, DirectAdmin) to perform the account management actions.
    • Added logging and exception handling to provide better visibility and error reporting for account management operations.
  2. In the CpanelClient class:

    • Implemented the API calls to the cPanel control panel for creating, suspending, unsuspending, changing package, and terminating accounts.
    • Added logging to track the success or failure of the API calls.
    • Handled Guzzle exceptions to ensure graceful error handling.

Summary

The key changes in this pull request are:

  • Implemented HostingService methods for provisionAccount, suspendAccount, unsuspendAccount, upgradeAccount, and terminateAccount
  • Added logging and exception handling to the HostingService and CpanelClient classes
  • Implemented the cPanel API calls in the CpanelClient class for account management operations

@curtisdelicata curtisdelicata merged commit 2eeefcc into main Aug 23, 2024
2 of 3 checks passed
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

Successfully merging this pull request may close these issues.

1 participant