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

added feature to rename a host #2

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+6 −3
Diff settings

Always

Just for now

View
9 ibcli
@@ -2396,10 +2396,10 @@ configuring a host for no dns (disable for dns)
=head2 Modifying hosts
You cannot rename a host, only modify the contents of it
conf zone foo.com modify host test 1.2.3.4
conf zone foo.com modify host test 1.2.3.4 rename test2
conf zone foo.com modify host test 1.2.3.4 comment "this is a comment"
@@ -2413,6 +2413,7 @@ sub cli_add_host {
my ( $type , $host ) = $line =~/(\S+) host (\S+)/ ;
my ( $j , $ip ) = $line =~/(add|modify) host \S+ ($REip\S*)/ ;
my ( $rename ) = $line =~/ rename (\S+)/;
my ( $zone ) = $line =~/ zone (\S+)/ ;
my ( $vname ) = $line =~/ view (\S+)/ ;
my ( $mac ) = $line =~/mac (\S+)/ ;
@@ -2570,6 +2571,8 @@ sub cli_add_host {
if ( $ttl ) { $obj->ttl ( $ttl ) }
if ( $rename ) { $obj->name ( $rename ) }
if ( @aliases ) { $obj->aliases ( \@aliases ) }
# set any values
@@ -12021,7 +12024,7 @@ my %COMMANDS = (
words => "<cr> at=<value>|template=<name>|<ip,ip>|set=<name=value>|option=<name=value>|view=<name>|ttl=<num>|info=<name=value>|comment=<comment>|alias=<name>|disabled|nodns",
func => "cli_ins_host", },
'configure zone <zone> modify host <name>' => {
words => "<cr> at=<value>|template=<name>|<ip,ip>|host_set=<name=value>|set=<name=value>|option=<name=value>|view=<name>|ttl=<num>|info=<name=value>|comment=<comment>|alias=<name>|disabled|nodns",
words => "<cr> at=<value>|template=<name>|<ip,ip>|host_set=<name=value>|set=<name=value>|option=<name=value>|view=<name>|ttl=<num>|info=<name=value>|comment=<comment>|alias=<name>|rename=<name>|disabled|nodns",
func => "cli_add_host", },
'configure zone <zone> add host' => {