-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1892 from caberos/issue1889
new feature on account hook-delete
- Loading branch information
Showing
7 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Delete a provisioning script""" | ||
# :license: MIT, see LICENSE for more details. | ||
|
||
import click | ||
import SoftLayer | ||
|
||
from SoftLayer.CLI.command import SLCommand as SLCommand | ||
from SoftLayer.CLI import environment | ||
from SoftLayer.managers.account import AccountManager as AccountManager | ||
|
||
|
||
@click.command(cls=SLCommand) | ||
@click.argument('identifier') | ||
@environment.pass_env | ||
def cli(env, identifier): | ||
"""Delete a provisioning script""" | ||
|
||
manager = AccountManager(env.client) | ||
|
||
try: | ||
manager.delete_provisioning(identifier) | ||
click.secho("%s deleted successfully" % identifier, fg='green') | ||
except SoftLayer.SoftLayerAPIError as ex: | ||
click.secho("Failed to delete %s\n%s" % (identifier, ex), fg='red') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
'uri': 'http://slclitest.com', | ||
'hookType': {} | ||
} | ||
deleteObject = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters