func (cmd *Policies) Run(c *cli.Context) { policies := entity_policies.PolicyList(cmd.network, c.Args()[0], c.Args()[1]) table := terminal.NewTable([]string{"Name", "State"}) for _, policy := range policies { table.Add(policy.Name, string(policy.State)) } table.Print() }
func (cmd *Policy) list(application, entity string) { policies, err := entity_policies.PolicyList(cmd.network, application, entity) if nil != err { error_handler.ErrorExit(err) } table := terminal.NewTable([]string{"Id", "Name", "State"}) for _, policy := range policies { table.Add(policy.Id, policy.Name, string(policy.State)) } table.Print() }