Package org.onosproject.cli
Class RolesCommand
- java.lang.Object
 - 
- org.onosproject.cli.AbstractShellCommand
 - 
- org.onosproject.cli.RolesCommand
 
 
 
- 
- All Implemented Interfaces:
 org.apache.karaf.shell.api.action.Action,CodecContext
public class RolesCommand extends AbstractShellCommand
Lists mastership roles of nodes for each device. 
- 
- 
Field Summary
- 
Fields inherited from class org.onosproject.cli.AbstractShellCommand
log 
 - 
 
- 
Constructor Summary
Constructors Constructor Description RolesCommand() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute()Body of the shell command.protected voidprintRoles(MastershipService service, DeviceId deviceId)Prints the role information for a device.- 
Methods inherited from class org.onosproject.cli.AbstractShellCommand
annotations, annotations, annotations, appId, codec, error, execute, get, getService, jsonForEntity, mapper, outputJson, print 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.onosproject.codec.CodecContext
decode, encode 
 - 
 
 - 
 
- 
- 
Method Detail
- 
doExecute
protected void doExecute()
Description copied from class:AbstractShellCommandBody of the shell command.- Specified by:
 doExecutein classAbstractShellCommand
 
- 
printRoles
protected void printRoles(MastershipService service, DeviceId deviceId)
Prints the role information for a device.- Parameters:
 service- mastership servicedeviceId- the ID of the device
 
 - 
 
 -