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

Skip to content

Commit b2a87aa

Browse files
committed
Example for slcli dedicatedhost create-options, slcli dns import, slcli dns record-edit command
1 parent e5b143f commit b2a87aa

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

SoftLayer/CLI/dedicatedhost/create_options.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
def cli(env, **kwargs):
2323
"""host order options for a given dedicated host.
2424
25-
To get a list of available backend routers see example:
26-
slcli dh create-options --datacenter dal05 --flavor 56_CORES_X_242_RAM_X_1_4_TB
27-
"""
25+
Exmaple::
26+
To get a list of available backend routers see example:
27+
slcli dh create-options --datacenter dal05 --flavor 56_CORES_X_242_RAM_X_1_4_TB
28+
"""
2829

2930
mgr = SoftLayer.DedicatedHostManager(env.client)
3031
tables = []

SoftLayer/CLI/dns/record_edit.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@
1919
help='TTL value in seconds, such as 86400')
2020
@environment.pass_env
2121
def cli(env, zone_id, by_record, by_id, data, ttl):
22-
"""Update DNS record."""
22+
"""Update DNS record.
23+
24+
Example::
25+
slcli dns record-edit ibm.com --by-id 12345678 --data 127.0.0.2 --ttl 3600
26+
This command edits records under the zone: ibm.com, whose ID is 12345678, \
27+
and sets its data to "127.0.0.2" and ttl to 3600.
28+
29+
slcli dns record-edit ibm.com --by-record kibana --ttl 3600
30+
This command edits records under the zone: ibm.com, whose host is "kibana", and sets their ttl all to 3600.
31+
"""
2332
manager = SoftLayer.DNSManager(env.client)
2433
zone_id = helpers.resolve_id(manager.resolve_ids, zone_id, name='zone')
2534

SoftLayer/CLI/dns/zone_import.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
@click.option('--dry-run', is_flag=True, help="Don't actually create records")
2424
@environment.pass_env
2525
def cli(env, zonefile, dry_run):
26-
"""Import zone based off a BIND zone file."""
26+
"""Import zone based off a BIND zone file.
27+
28+
Example::
29+
slcli dns import ~/ibm.com.txt
30+
This command imports zone and its resource records from file: ~/ibm.com.txt
31+
"""
2732

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

0 commit comments

Comments
 (0)