diff options
author | 2018-07-25 19:37:36 +0800 | |
---|---|---|
committer | 2018-07-25 19:37:36 +0800 | |
commit | b8308fc07ed741b9194b04449347117f2dfb426a (patch) | |
tree | e4aeb086d993a4dcdf8cb36740ed0a20a3086867 /openstack-console/src/main/java/com/woorea/openstack/console/nova/NovaServerList.java | |
parent | b976af3397c98517d09aa605ea09cf71d21a5f68 (diff) |
code refactroing of console code
Issue-ID: SO-729
Change-Id: I3489dbd52b114e309fb2c1bcc1388787a5b72e7a
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'openstack-console/src/main/java/com/woorea/openstack/console/nova/NovaServerList.java')
-rw-r--r-- | openstack-console/src/main/java/com/woorea/openstack/console/nova/NovaServerList.java | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/openstack-console/src/main/java/com/woorea/openstack/console/nova/NovaServerList.java b/openstack-console/src/main/java/com/woorea/openstack/console/nova/NovaServerList.java index 4e210c8..8f8f20c 100644 --- a/openstack-console/src/main/java/com/woorea/openstack/console/nova/NovaServerList.java +++ b/openstack-console/src/main/java/com/woorea/openstack/console/nova/NovaServerList.java @@ -26,35 +26,35 @@ import com.woorea.openstack.nova.model.Server; import com.woorea.openstack.nova.model.Servers; public class NovaServerList extends NovaCommand { - - public NovaServerList() { - super("list"); - } - - @Override - public void execute(Nova nova, CommandLine cmd) { - - final Servers servers = nova.servers().list(true).execute(); - - Table t = new Table(new TableModel<Server>(servers.getList()) { - - @Override - public Column[] getHeaders() { - return new Column[]{ - new Column("id", 32, Column.ALIGN_LEFT), - new Column("name", 10, Column.ALIGN_LEFT) - }; - } - - @Override - public String[] getRow(Server server) { - return new String[]{ - server.getId(), - server.getName() - }; - } - }); - System.out.println(t.render()); - } + + public NovaServerList() { + super("list"); + } + + @Override + public void execute(Nova nova, CommandLine cmd) { + + final Servers servers = nova.servers().list(true).execute(); + + Table t = new Table(new TableModel<Server>(servers.getList()) { + + @Override + public Column[] getHeaders() { + return new Column[]{ + new Column("id", 32, Column.ALIGN_LEFT), + new Column("name", 10, Column.ALIGN_LEFT) + }; + } + + @Override + public String[] getRow(Server server) { + return new String[]{ + server.getId(), + server.getName() + }; + } + }); + System.out.println(t.render()); + } } |