{"action":"closed","issue":{"url":"https://api.github.com/repos/arista-eosplus/pyeapi/issues/33","labels_url":"https://api.github.com/repos/arista-eosplus/pyeapi/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/arista-eosplus/pyeapi/issues/33/comments","events_url":"https://api.github.com/repos/arista-eosplus/pyeapi/issues/33/events","html_url":"https://github.com/arista-eosplus/pyeapi/issues/33","id":104966323,"number":33,"title":"[API Users] Can't run set_role with no value","user":{"login":"phil-arista","id":7631359,"avatar_url":"https://avatars.githubusercontent.com/u/7631359?v=3","gravatar_id":"","url":"https://api.github.com/users/phil-arista","html_url":"https://github.com/phil-arista","followers_url":"https://api.github.com/users/phil-arista/followers","following_url":"https://api.github.com/users/phil-arista/following{/other_user}","gists_url":"https://api.github.com/users/phil-arista/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-arista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-arista/subscriptions","organizations_url":"https://api.github.com/users/phil-arista/orgs","repos_url":"https://api.github.com/users/phil-arista/repos","events_url":"https://api.github.com/users/phil-arista/events{/privacy}","received_events_url":"https://api.github.com/users/phil-arista/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/arista-eosplus/pyeapi/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"phil-arista","id":7631359,"avatar_url":"https://avatars.githubusercontent.com/u/7631359?v=3","gravatar_id":"","url":"https://api.github.com/users/phil-arista","html_url":"https://github.com/phil-arista","followers_url":"https://api.github.com/users/phil-arista/followers","following_url":"https://api.github.com/users/phil-arista/following{/other_user}","gists_url":"https://api.github.com/users/phil-arista/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-arista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-arista/subscriptions","organizations_url":"https://api.github.com/users/phil-arista/orgs","repos_url":"https://api.github.com/users/phil-arista/repos","events_url":"https://api.github.com/users/phil-arista/events{/privacy}","received_events_url":"https://api.github.com/users/phil-arista/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-09-04T20:43:37Z","updated_at":"2015-09-08T14:53:53Z","closed_at":"2015-09-08T14:53:53Z","body":"You can't run the CLI command: 'username test no role', which is what is used when you \r\ninvoke: node.api('users').set_role('test')\r\n\r\nAs an aside, this missed testing because the function names weren't prefixed with test_ so python's unittest never ran them.\r\n\r\nThe faulty code is:\r\n```\r\n        cmd = 'username %s' % name\r\n        if value is not None:\r\n            cmd += ' role %s' % value\r\n        else:\r\n            cmd += ' no role'\r\n        return self.configure(cmd)\r\n```\r\n\r\nThis works:\r\n```\r\n        cmd = 'username %s' % name\r\n        if value is not None:\r\n            cmd += ' role %s' % value\r\n        else:\r\n            cmd = 'default username %s role' % name\r\n        return self.configure(cmd)\r\n```"}}