54 compadd "$@" - $(dladm show-bridge -p -o bridge) |
49 compadd "$@" - $(dladm show-bridge -p -o bridge) |
55 } |
50 } |
56 |
51 |
57 _dladm_iptuns() { |
52 _dladm_iptuns() { |
58 compadd "$@" - $(dladm show-iptun -p -o link) |
53 compadd "$@" - $(dladm show-iptun -p -o link) |
|
54 } |
|
55 |
|
56 _dladm_parts() { |
|
57 compadd "$@" - $(dladm show-part -p -o link) |
|
58 } |
|
59 |
|
60 _dladm_iblinks() { |
|
61 compadd "$@" - $(dladm show-ib -p -o link) |
59 } |
62 } |
60 |
63 |
61 _dladm() { |
64 _dladm() { |
62 local context state line expl |
65 local context state line expl |
63 typeset -A opt_args |
66 typeset -A opt_args |
64 local -a subcmds rw_properties rw_propnames ro_properties |
67 local -a subcmds |
65 local -a link_properties link_stats_properties |
68 local -a linkprops linkprops_general linkprops_nonvlanvnic linkprops_wifi |
|
69 local -a linkprops_ether linkprops_ib linkprops_iptun |
|
70 local -a link_properties link_stats_properties vnic_properties |
66 local -a aggr_properties aggr_lacp_properties aggr_ext_properties |
71 local -a aggr_properties aggr_lacp_properties aggr_ext_properties |
67 local -a vlan_properties wifi_properties wifi_connect_properties |
72 local -a vlan_properties wifi_properties wifi_connect_properties |
68 local -a ether_properties linkprop_properties secobj_properties |
73 local -a ether_properties linkprop_properties secobj_properties |
69 local -a bridge_properties bridge_stats_properties bridge_link_properties |
74 local -a bridge_properties bridge_stats_properties bridge_link_properties |
70 local -a bridge_link_stats_properties bridge_fwd_properties bridge_fwd_properties |
75 local -a bridge_link_stats_properties bridge_fwd_properties |
71 local -a iptun_properties |
76 local -a bridge_fwd_properties bridge_trill_properties |
|
77 local -a iptun_properties tunnel_values part_properties ib_properties |
72 |
78 |
73 # TODO: some subcommands can take multiple comma-separated targets |
79 # TODO: some subcommands can take multiple comma-separated targets |
74 # TODO: some option sets may be different based on other commandline flags |
80 # TODO: some option sets may be different based on other commandline flags |
75 # TODO: some subcommands may take different arguments based on options |
81 # TODO: some subcommands may take different arguments based on options |
76 |
82 |
77 subcmds=( |
83 subcmds=( |
78 "show-ether" "show-usage" |
84 "show-ether" "show-ib" "show-usage" |
79 {"rename","show"}"-link" |
85 {"rename","show"}"-link" |
80 {"add","create","delete","modify","remove","show"}"-aggr" |
86 {"add","create","delete","modify","remove","show"}"-aggr" |
81 {"connect","disconnect","scan","show"}"-wifi" |
87 {"connect","disconnect","scan","show"}"-wifi" |
82 {"reset","set","show"}"-linkprop" |
88 {"reset","set","show"}"-linkprop" |
83 {"create","delete","show"}"-secobj" |
89 {"create","delete","show"}"-secobj" |
85 {"delete","show"}"-phys" |
91 {"delete","show"}"-phys" |
86 {"create","delete","show"}"-vnic" |
92 {"create","delete","show"}"-vnic" |
87 {"create","delete","show"}"-etherstub" |
93 {"create","delete","show"}"-etherstub" |
88 {"create","modify","delete","add","remove","show"}"-bridge" |
94 {"create","modify","delete","add","remove","show"}"-bridge" |
89 {"create","modify","delete","show"}"-iptun" |
95 {"create","modify","delete","show"}"-iptun" |
|
96 {"create","delete","show"}"-part" |
90 ) |
97 ) |
91 |
98 |
92 if [[ $service == "dladm" ]]; then |
99 if [[ $service == "dladm" ]]; then |
93 _arguments -C -A "-*" \ |
100 _arguments -C -A "-*" \ |
94 '-\?[Help]' \ |
101 '-\?[Help]' \ |
100 fi |
107 fi |
101 service="$words[1]" |
108 service="$words[1]" |
102 curcontext="${curcontext%:*}=$service:" |
109 curcontext="${curcontext%:*}=$service:" |
103 fi |
110 fi |
104 |
111 |
105 link_properties=( "link" "class" "mtu" "state" "over" ) |
112 link_properties=( "link" "zone" "class" "mtu" "state" "over" ) |
106 link_stats_properties=( "link" "ipackets" "rbytes" "ierrors" "opackets" "obytes" "oerrors" ) |
113 link_stats_properties=( "link" "ipackets" "rbytes" "ierrors" "opackets" "obytes" "oerrors" ) |
107 |
114 |
108 aggr_properties=( "link" "policy" "addrpolicy" "lacpactivity" "lacptimer" "flags" ) |
115 aggr_properties=( "link" "policy" "addrpolicy" "lacpactivity" "lacptimer" "flags" ) |
109 aggr_lacp_properties=( "link" "port" "aggregatable" "sync" "coll" "dist" "defaulted" "expired" ) |
116 aggr_lacp_properties=( "link" "port" "aggregatable" "sync" "coll" "dist" "defaulted" "expired" ) |
110 aggr_ext_properties=( "link" "port" "speed" "duplex" "state" "address" "portstate" ) |
117 aggr_ext_properties=( "link" "port" "speed" "duplex" "state" "address" "portstate" ) |
130 "desroot" "descost" "desbridge" "desport" "tcack" ) |
137 "desroot" "descost" "desbridge" "desport" "tcack" ) |
131 bridge_link_stats_properties=( "link" "cfgbpdu" "tcnbpdu" "rstpbpdu" "txbpdu" "drops" "recv" "xmit" ) |
138 bridge_link_stats_properties=( "link" "cfgbpdu" "tcnbpdu" "rstpbpdu" "txbpdu" "drops" "recv" "xmit" ) |
132 bridge_fwd_properties=( "dest" "age" "flags" "output" ) |
139 bridge_fwd_properties=( "dest" "age" "flags" "output" ) |
133 bridge_trill_properties=( "nick" "flags" "link" "nexthop" ) |
140 bridge_trill_properties=( "nick" "flags" "link" "nexthop" ) |
134 |
141 |
135 iptun_properties=( "link" "type" "flags" ) |
142 iptun_properties=( "link" "type" "flags" "local" "remote" ) |
|
143 tunnel_values=( "local:address/host: " "remote:address/host: " ) |
|
144 |
|
145 part_properties=( "link" "pkey" "over" "state" "flags" ) |
|
146 |
|
147 ib_properties=( "link" "hcaguid" "portguid" "port" "state" "pkeys" ) |
|
148 |
|
149 linkprops_general=( |
|
150 "autopush:streams modules:" |
|
151 "cpus:processors:" |
|
152 "cpus-effective" |
|
153 "mac-address:MAC address:" |
|
154 "maxbw:bandwith:" |
|
155 "pool:pools:" |
|
156 "pool-effective" |
|
157 "priority:priority:(high medium low)" |
|
158 "rxringsavail" |
|
159 "rxrings:value:" |
|
160 "rxhwclntavail" |
|
161 "txringsavail" |
|
162 "txrings:value:" |
|
163 "txhwclntavail" |
|
164 "forward:value:(0 1)" |
|
165 "stp_priority:value:" |
|
166 "stp_cost:value:" |
|
167 "stp_edge:value:(0 1)" |
|
168 "stp_p2p:value:(true false auto)" |
|
169 "stp_mcheck:value:(0 1)" |
|
170 "protection:value:(mac-nospoof ip-nospoof dhcp-nospoof restricted)" |
|
171 "zone:value:_zones" |
|
172 ) |
|
173 linkprops_nonvlanvnic=( |
|
174 "default_tag:value:" |
|
175 "learn_decay:value:" |
|
176 "learn_limit:value:" |
|
177 "rxfanout:value:" |
|
178 "rxfanout-effective:value:" |
|
179 "stp:value:(0 1)" |
|
180 ) |
|
181 linkprops_wifi=( |
|
182 "channel:value:" |
|
183 "powermode:value:(off max fast)" |
|
184 "radio:value:(on off)" |
|
185 "speed:value:" |
|
186 ) |
|
187 linkprops_ether=( |
|
188 "duplex" |
|
189 "state" |
|
190 "adv_autoneg_cap" |
|
191 "adv_10gfdx_cap" |
|
192 "adv_1000fdx_cap" |
|
193 "adv_1000hdx_cap" |
|
194 "adv_100fdx_cap" |
|
195 "adv_100hdx_cap" |
|
196 "adv_10fdx_cap" |
|
197 "adv_10hdx_cap" |
|
198 "en_10gfdx_cap:value:(0 1)" |
|
199 "en_1000fdx_cap:value:(0 1)" |
|
200 "en_1000hdx_cap:value:(0 1)" |
|
201 "en_100fdx_cap:value:(0 1)" |
|
202 "en_100hdx_cap:value:(0 1)" |
|
203 "en_10fdx_cap:value:(0 1)" |
|
204 "en_10hdx_cap:value:(0 1)" |
|
205 "flowctrl:value:(auto no rx tx pfc bi)" |
|
206 "flowctrl-effective" |
|
207 "gvrp-timeout:value:" |
|
208 "mtu:value:" |
|
209 "ntcs" |
|
210 "pfcmap:value:" |
|
211 "speed" |
|
212 "tagmode:value:(normal vlanonly)" |
|
213 "vlan-announce:value:(off gvrp)" |
|
214 ) |
|
215 linkprops_ib=( |
|
216 "linkmode:value:(cm ud)" |
|
217 ) |
|
218 linkprops_iptun=( |
|
219 "hoplimit:value:" |
|
220 "encaplimit:value:" |
|
221 ) |
|
222 linkprops=( |
|
223 $linkprops_general $linkprops_wifi $linkprops_ether |
|
224 $linkprops_ib $linkprops_iptun |
|
225 ) |
136 |
226 |
137 case $service in |
227 case $service in |
138 ("show-link") |
228 ("show-link") |
139 _arguments -A "-*" \ |
229 _arguments -A "-*" \ |
140 '(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \ |
230 '(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \ |
141 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
231 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
|
232 '-Z[Display ZONE column in output]' \ |
|
233 '-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \ |
142 - set1 \ |
234 - set1 \ |
143 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $link_properties' \ |
235 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $link_properties' \ |
144 - set2 \ |
236 - set2 \ |
145 '(-s --statistics)'{-s,--statistics}'[Display link statistics]' \ |
237 '(-s --statistics)'{-s,--statistics}'[Display link statistics]' \ |
146 '(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \ |
238 '(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \ |
156 ;; |
248 ;; |
157 |
249 |
158 ("show-phys") |
250 ("show-phys") |
159 _arguments -A "-*" \ |
251 _arguments -A "-*" \ |
160 '-H[Show hardware resource usage]' \ |
252 '-H[Show hardware resource usage]' \ |
|
253 '-L[Display location information]' \ |
161 '(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \ |
254 '(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \ |
162 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
255 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
|
256 '-m[Display MAC address information]' \ |
|
257 '-Z[Display ZONE column in output]' \ |
|
258 '-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \ |
163 '(-s --statistics)'{-s,--statistics}'[Display link statistics]' \ |
259 '(-s --statistics)'{-s,--statistics}'[Display link statistics]' \ |
164 '(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \ |
260 '(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \ |
165 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" link media state speed duplex device' \ |
261 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" link media state speed duplex device' \ |
166 ':physical link name:_dladm_devs' |
262 ':physical link name:_dladm_devs' |
167 ;; |
263 ;; |
222 _arguments -A "-*" \ |
318 _arguments -A "-*" \ |
223 '(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \ |
319 '(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \ |
224 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
320 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
225 '(-s --statistics)'{-s,--statistics}'[Display link statistics]' \ |
321 '(-s --statistics)'{-s,--statistics}'[Display link statistics]' \ |
226 '(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \ |
322 '(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \ |
|
323 '-Z[Display ZONE column in output]' \ |
|
324 '-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \ |
227 ':aggregate link name:_dladm_links' \ |
325 ':aggregate link name:_dladm_links' \ |
228 - set1 \ |
326 - set1 \ |
229 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $aggr_properties' \ |
327 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $aggr_properties' \ |
230 - lacp \ |
328 - lacp \ |
231 '(-L --lacp)'{-L,--lacp}'[LACP information]' \ |
329 '(-L --lacp)'{-L,--lacp}'[LACP information]' \ |
255 ("show-vlan") |
353 ("show-vlan") |
256 _arguments -A "-*" \ |
354 _arguments -A "-*" \ |
257 '(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \ |
355 '(-P --persistent)'{-P,--persistent}'[Display persistent link configuration]' \ |
258 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
356 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
259 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $vlan_properties' \ |
357 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $vlan_properties' \ |
|
358 '-Z[Display ZONE column in output]' \ |
|
359 '-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \ |
260 ':VLAN link name:_dladm_vlans' |
360 ':VLAN link name:_dladm_vlans' |
261 ;; |
361 ;; |
262 |
362 |
263 ("scan-wifi") |
363 ("scan-wifi") |
264 _arguments -A "-*" \ |
364 _arguments -A "-*" \ |
290 |
390 |
291 ("show-wifi") |
391 ("show-wifi") |
292 _arguments -A "-*" \ |
392 _arguments -A "-*" \ |
293 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
393 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
294 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $wifi_properties' \ |
394 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $wifi_properties' \ |
|
395 '-Z[Display ZONE column in output]' \ |
|
396 '-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \ |
295 ':wireless link name:_dladm_wifi_links' |
397 ':wireless link name:_dladm_wifi_links' |
296 ;; |
398 ;; |
297 |
399 |
298 ("show-ether") |
400 ("show-ether") |
299 _arguments -A "-*" \ |
401 _arguments -A "-*" \ |
300 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
402 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
301 '(-x --extended)'{-x,--extended}'[Extended output]' \ |
403 '(-x --extended)'{-x,--extended}'[Extended output]' \ |
302 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $ether_properties' \ |
404 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $ether_properties' \ |
|
405 '-Z[Display ZONE column in output]' \ |
|
406 '-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \ |
303 ':ethernet link name:_dladm_ethers' |
407 ':ethernet link name:_dladm_ethers' |
304 ;; |
408 ;; |
305 |
409 |
306 ("set-linkprop") |
410 ("set-linkprop") |
307 _arguments -A "-*" \ |
411 _arguments -A "-*" \ |
308 '(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \ |
412 '(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \ |
309 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
413 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
310 '(-p --prop)'{-p,--prop}'[Properties]:property:_dladm_linkprops' \ |
414 '(-p --prop)'{-p,--prop}'[Properties]:property:_values -s , "property" ${(M)linkprops\:#*\:*}' \ |
311 ':link name:_dladm_links' |
415 ':link name:_dladm_links' |
312 ;; |
416 ;; |
313 |
417 |
314 ("reset-linkprop") |
418 ("reset-linkprop") |
315 _arguments -A "-*" \ |
419 _arguments -A "-*" \ |
316 '(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \ |
420 '(-t --temporary)'{-t,--temporary}'[Change should be temporary]' \ |
317 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
421 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
318 '(-p --prop)'{-p,--prop}'[Properties]:property:_dladm_linkprops' \ |
422 '(-p --prop)'{-p,--prop}'[Properties]:property:_values -s , "property" ${${(M)linkprops\:#*\:*}%%\:*}' \ |
319 ':link name:_dladm_links' |
423 ':link name:_dladm_links' |
320 ;; |
424 ;; |
321 |
425 |
322 ("show-linkprop") |
426 ("show-linkprop") |
323 _arguments -A "-*" \ |
427 _arguments -A "-*" \ |
324 '(-P --persistent)'{-P,--persistent}'[Display persistent link properties]' \ |
428 '(-P --persistent)'{-P,--persistent}'[Display persistent link properties]' \ |
325 '(-c --parseable)'{-c,--parseable}'[Parseable output]' \ |
429 '(-c --parseable)'{-c,--parseable}'[Parseable output]' \ |
326 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $linkprop_properties' \ |
430 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $linkprop_properties' \ |
327 '(-p --prop)'{-p,--prop}'[Properties]:property:_dladm_linkprops' \ |
431 '(-p --prop)'{-p,--prop}'[Properties]:property:_values -s , "property" ${linkprops%%\:*}' \ |
|
432 '-Z[Display ZONE column in output]' \ |
|
433 '-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \ |
328 ':link name:_dladm_links' |
434 ':link name:_dladm_links' |
329 ;; |
435 ;; |
330 |
436 |
331 ("create-secobj") |
437 ("create-secobj") |
332 _arguments -A "-*" \ |
438 _arguments -A "-*" \ |
358 '(-t --temporary)'{-t,--temporary}'[Creation should be temporary]' \ |
464 '(-t --temporary)'{-t,--temporary}'[Creation should be temporary]' \ |
359 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
465 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
360 '(-l --link)'{-l,--link}'[Component link]:link:_dladm_links' \ |
466 '(-l --link)'{-l,--link}'[Component link]:link:_dladm_links' \ |
361 '(-m --mac-address)'{-m,--mac-address}'[MAC address]:address:(factory random auto vrrp)' \ |
467 '(-m --mac-address)'{-m,--mac-address}'[MAC address]:address:(factory random auto vrrp)' \ |
362 '-v[VLAN ID]:id:' \ |
468 '-v[VLAN ID]:id:' \ |
363 '(-p --prop)'{-p,--prop}'[Property values]:value:' \ |
469 '(-p --prop)'{-p,--prop}'[Property values]:value:_values -s , "property" ${(M)linkprops_general\:#*\:*}' \ |
364 ':VNIC name:' |
470 ':VNIC name:' |
365 ;; |
471 ;; |
366 |
472 |
367 ("delete-vnic") |
473 ("delete-vnic") |
368 _arguments -A "-*" \ |
474 _arguments -A "-*" \ |
377 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
483 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
378 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $vnic_properties' \ |
484 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $vnic_properties' \ |
379 '(-l --link)'{-l,--link}'[Limit to VNICs on link]:link:_dladm_links' \ |
485 '(-l --link)'{-l,--link}'[Limit to VNICs on link]:link:_dladm_links' \ |
380 '(-s --statistics)'{-s,--statistics}'[Display VNIC statistics]' \ |
486 '(-s --statistics)'{-s,--statistics}'[Display VNIC statistics]' \ |
381 '(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \ |
487 '(-i --interval)'{-i,--interval}'[Specify an interval]:interval:' \ |
|
488 '-Z[Display ZONE column in output]' \ |
|
489 '-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \ |
382 ':VNIC name:_dladm_vnics' |
490 ':VNIC name:_dladm_vnics' |
383 ;; |
491 ;; |
384 |
492 |
385 ("create-etherstub") |
493 ("create-etherstub") |
386 _arguments -A "-*" \ |
494 _arguments -A "-*" \ |
452 ':bridge name:_dladm_bridges' |
562 ':bridge name:_dladm_bridges' |
453 ;; |
563 ;; |
454 |
564 |
455 |
565 |
456 ("show-bridge") |
566 ("show-bridge") |
|
567 # XXX $bridge_stats_properties get added into -o completions for set1 |
|
568 # XXX $bridge_link_stats_properties get added into -o completions for set3 |
457 _arguments -A "-*" \ |
569 _arguments -A "-*" \ |
458 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
570 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
459 - set1 \ |
571 - set1 \ |
460 # XXX $bridge_stats_properties get added in! |
|
461 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $bridge_properties' \ |
572 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $bridge_properties' \ |
462 - set2 \ |
573 - set2 \ |
463 '(-s --statistics)'{-s,--statistics}'[Display statistics]' \ |
574 '(-s --statistics)'{-s,--statistics}'[Display statistics]' \ |
464 '(-i --interval)'{-i,--interval}'[Specify an interval]:seconds' \ |
575 '(-i --interval)'{-i,--interval}'[Specify an interval]:seconds' \ |
465 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $bridge_stats_properties' \ |
576 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $bridge_stats_properties' \ |
466 - set3 \ |
577 - set3 \ |
467 # XXX $bridge_link_stats_properties get added in! |
|
468 '(-l --link)'{-l,--link}'[Display link status or statistics]' \ |
578 '(-l --link)'{-l,--link}'[Display link status or statistics]' \ |
469 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $bridge_link_properties' \ |
579 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $bridge_link_properties' \ |
470 - set4 \ |
580 - set4 \ |
471 '(-s --statistics)'{-s,--statistics}'[Display statistics]' \ |
581 '(-s --statistics)'{-s,--statistics}'[Display statistics]' \ |
472 '(-l --link)'{-l,--link}'[Display link status or statistics]' \ |
582 '(-l --link)'{-l,--link}'[Display link status or statistics]' \ |
485 ("create-iptun") |
595 ("create-iptun") |
486 _arguments -A "-*" \ |
596 _arguments -A "-*" \ |
487 '(-t --temporary)'{-t,--temporary}'[Temporary tunnel]' \ |
597 '(-t --temporary)'{-t,--temporary}'[Temporary tunnel]' \ |
488 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
598 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
489 '(-T --type)'{-T,--type}'[Tunnel type]:tunnel type:(ipv4 ipv6 6to4)' \ |
599 '(-T --type)'{-T,--type}'[Tunnel type]:tunnel type:(ipv4 ipv6 6to4)' \ |
490 '(-s --tunnel-src)'{-s,--tunnel-src}'[Tunnel source]:address/host:' \ |
600 '(-a --address)'{-a,--address}'[Endpoint addresses]:address/host:_values -s , "address/host" $tunnel_values' \ |
491 '(-d --tunnel-dst)'{-d,--tunnel-dst}'[Tunnel dest]:address/host:' \ |
|
492 ':tunnel name:' |
601 ':tunnel name:' |
493 ;; |
602 ;; |
494 |
603 |
495 ("modify-iptun") |
604 ("modify-iptun") |
496 _arguments -A "-*" \ |
605 _arguments -A "-*" \ |
497 '(-t --temporary)'{-t,--temporary}'[Temporary modification]' \ |
606 '(-t --temporary)'{-t,--temporary}'[Temporary modification]' \ |
498 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
607 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
499 '(-s --tunnel-src)'{-s,--tunnel-src}'[Tunnel source]:address/host:' \ |
608 '(-a --address)'{-a,--address}'[Endpoint addresses]:address/host:_values -s , "address/host" $tunnel_values' \ |
500 '(-d --tunnel-dst)'{-d,--tunnel-dst}'[Tunnel dest]:address/host:' \ |
|
501 ':tunnel name:_dladm_iptuns' |
609 ':tunnel name:_dladm_iptuns' |
502 ;; |
610 ;; |
503 |
611 |
504 ("delete-iptun") |
612 ("delete-iptun") |
505 _arguments -A "-*" \ |
613 _arguments -A "-*" \ |
511 ("show-iptun") |
619 ("show-iptun") |
512 _arguments -A "-*" \ |
620 _arguments -A "-*" \ |
513 '(-P --persistent)'{-P,--persistent}'[Display persistent tunnel configuration]' \ |
621 '(-P --persistent)'{-P,--persistent}'[Display persistent tunnel configuration]' \ |
514 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
622 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
515 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $iptun_properties' \ |
623 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $iptun_properties' \ |
|
624 '-Z[Display ZONE column in output]' \ |
|
625 '-z[zone]:zonename:_values -s , "zone" $(zoneadm list)' \ |
516 ':tunnel name:_dladm_iptuns' |
626 ':tunnel name:_dladm_iptuns' |
|
627 ;; |
|
628 |
|
629 ("create-part") |
|
630 _arguments -A "-*" \ |
|
631 '(-t --temporary)'{-t,--temporary}'[Temporary partition]' \ |
|
632 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
|
633 '(-f --force)'{-f,--force}'[Force partition creation]' \ |
|
634 '(-l --link)'{-l,--link}'[IP-over-IB physical link name]:IB link:_dladm_iblinks' \ |
|
635 '(-p --prop)'{-p,--prop}'[Set link properties]:link property:_values -s , "property" ${(M)linkprops_nonvlanvnic\:#*\:*} ${(M)linkprops_general\:#*\:*}' \ |
|
636 '(-P --pkey)'{-P,--pkey}'[Set parition key]:hex number:' \ |
|
637 ':partition link name:' |
|
638 ;; |
|
639 |
|
640 ("delete-part") |
|
641 _arguments -A "-*" \ |
|
642 '(-t --temporary)'{-t,--temporary}'[Temporary deletion]' \ |
|
643 '(-R --root)'{-R,--root}'[Root directory]:directory:_path_files -/' \ |
|
644 ':link name:_dladm_parts' |
|
645 ;; |
|
646 |
|
647 ("show-part") |
|
648 _arguments -A "-*" \ |
|
649 '(-P --persistent)'{-P,--persistent}'[Display persistent partition configuration]' \ |
|
650 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
|
651 '(-l --link)'{-l,--link}'[Information for this link]:link name:_dladm_iblinks' \ |
|
652 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $part_properties' \ |
|
653 ':partition link name:_dladm_parts' |
|
654 ;; |
|
655 |
|
656 ("show-ib") |
|
657 _arguments -A "-*" \ |
|
658 '(-P --persistent)'{-P,--persistent}'[Display persistent partition configuration]' \ |
|
659 '(-p --parseable)'{-p,--parseable}'[Parseable output]' \ |
|
660 '(-o --output)'{-o,--output}'[Properties to display]:property:_values -s , "property" $ib_properties' \ |
|
661 ':IB link name:_dladm_iblinks' |
517 ;; |
662 ;; |
518 |
663 |
519 (*) |
664 (*) |
520 _message "unknown dladm subcommand: $service" |
665 _message "unknown dladm subcommand: $service" |
521 ;; |
666 ;; |