Skip to content

Commit dfb93af

Browse files
Merge pull request #2065 from softlayer/jayasilan-issue2022
Example for slcli dns zone-create, slcli dns record-list, slcli dns record-remove command #2022
2 parents e86f438 + 37a1f7a commit dfb93af

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

SoftLayer/CLI/dns/record_list.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@
1919
@click.option('--type', 'record_type', help='Record type, such as A or CNAME')
2020
@environment.pass_env
2121
def cli(env, zone, data, record, ttl, record_type):
22-
"""List all records in a zone."""
22+
"""List all records in a zone.
23+
24+
Example::
25+
slcli dns record-list ibm.com --record elasticsearch --type A --ttl 900
26+
This command lists all A records under the zone: ibm.com, and \
27+
filters by host is elasticsearch and ttl is 900 seconds.
28+
"""
2329

2430
manager = SoftLayer.DNSManager(env.client)
2531
table = formatting.Table(['id', 'record', 'type', 'ttl', 'data'])

SoftLayer/CLI/dns/record_remove.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
@click.argument('record_id')
1414
@environment.pass_env
1515
def cli(env, record_id):
16-
"""Remove resource record."""
16+
"""Remove resource record.
17+
18+
Example::
19+
slcli dns record-remove 12345678
20+
This command removes resource record with ID 12345678.
21+
"""
1722

1823
manager = SoftLayer.DNSManager(env.client)
1924

SoftLayer/CLI/dns/zone_create.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
@click.argument('zone')
1212
@environment.pass_env
1313
def cli(env, zone):
14-
"""Create a zone."""
14+
"""Create a zone.
15+
16+
Example::
17+
slcli dns zone-create ibm.com
18+
This command creates a zone that is named ibm.com.
19+
"""
1520

1621
manager = SoftLayer.DNSManager(env.client)
1722
manager.create_zone(zone)

0 commit comments

Comments
 (0)