948
• If the specified group does not exist, the system creates a new object group and enters the
object group view.
• If the specified group exists but the group type is different from that in the command, the
command fails.
The undo object-group command execution results vary with the specified object group.
• If the specified group does not exist, the system executes the command without any system
prompt.
• If the specified group exists and the group type is the same as that in the command, the system
deletes the group.
• If the specified group exists but the group type is different from that in the command, the
command fails.
• If the specified object group is being used by an ACL, object policy, or object group, the
command fails.
Default object groups cannot be deleted.
Examples
# Configure an IPv4 address object group named ipgroup.
<Sysname> system-view
[Sysname] object-group ip address ipgroup
# Configure an IPv6 address object group named ipv6group.
<Sysname> system-view
[Sysname] object-group ipv6 address ipv6group
# Configure a port object group named portgroup.
<Sysname> system-view
[Sysname] object-group port portgroup
# Configure a service object group named servicegroup.
<Sysname> system-view
[Sysname] object-group service servicegroup
object-group rename
Use object-group rename to rename an object group.
Syntax
object-group rename old-object-group-name new-object-group-name
Views
System view
Predefined user roles
network-admin
Parameters
old-object-group-name: Specifies the name of the object group to be renamed, a case-insensitive
string of 1 to 31 characters.
new-object-group-name: Specifies a new name for the object group, a case-insensitive string of 1 to
31 characters. The object group name must be globally unique.
Usage guidelines
You can only rename non-default object groups.