Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Example for slcli dedicatedhost create-options, slcli dns import, slcli dns record-edit command #2021 #2064

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

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions SoftLayer/CLI/dedicatedhost/create_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
def cli(env, **kwargs):
"""host order options for a given dedicated host.

To get a list of available backend routers see example:
slcli dh create-options --datacenter dal05 --flavor 56_CORES_X_242_RAM_X_1_4_TB
"""
Example::
To get a list of available backend routers see example:
slcli dh create-options --datacenter dal05 --flavor 56_CORES_X_242_RAM_X_1_4_TB
"""

mgr = SoftLayer.DedicatedHostManager(env.client)
tables = []
Expand Down
11 changes: 10 additions & 1 deletion SoftLayer/CLI/dns/record_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@
help='TTL value in seconds, such as 86400')
@environment.pass_env
def cli(env, zone_id, by_record, by_id, data, ttl):
"""Update DNS record."""
"""Update DNS record.

Example::
slcli dns record-edit ibm.com --by-id 12345678 --data 127.0.0.2 --ttl 3600
This command edits records under the zone: ibm.com, whose ID is 12345678, \
and sets its data to "127.0.0.2" and ttl to 3600.

slcli dns record-edit ibm.com --by-record kibana --ttl 3600
This command edits records under the zone: ibm.com, whose host is "kibana", and sets their ttl all to 3600.
"""
manager = SoftLayer.DNSManager(env.client)
zone_id = helpers.resolve_id(manager.resolve_ids, zone_id, name='zone')

Expand Down
7 changes: 6 additions & 1 deletion SoftLayer/CLI/dns/zone_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@
@click.option('--dry-run', is_flag=True, help="Don't actually create records")
@environment.pass_env
def cli(env, zonefile, dry_run):
"""Import zone based off a BIND zone file."""
"""Import zone based off a BIND zone file.

Example::
slcli dns import ~/ibm.com.txt
This command imports zone and its resource records from file: ~/ibm.com.txt
"""

manager = SoftLayer.DNSManager(env.client)
with open(zonefile, encoding="utf-8") as zone_f:
Expand Down