{"action":"reopened","issue":{"url":"https://api.github.com/repos/p1up/sonicwall_firewall/issues/2","repository_url":"https://api.github.com/repos/p1up/sonicwall_firewall","labels_url":"https://api.github.com/repos/p1up/sonicwall_firewall/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/p1up/sonicwall_firewall/issues/2/comments","events_url":"https://api.github.com/repos/p1up/sonicwall_firewall/issues/2/events","html_url":"https://github.com/p1up/sonicwall_firewall/issues/2","id":167756070,"number":2,"title":"Add some \"contains\"","user":{"login":"ryanlrussell","id":1728937,"avatar_url":"https://avatars.githubusercontent.com/u/1728937?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanlrussell","html_url":"https://github.com/ryanlrussell","followers_url":"https://api.github.com/users/ryanlrussell/followers","following_url":"https://api.github.com/users/ryanlrussell/following{/other_user}","gists_url":"https://api.github.com/users/ryanlrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanlrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanlrussell/subscriptions","organizations_url":"https://api.github.com/users/ryanlrussell/orgs","repos_url":"https://api.github.com/users/ryanlrussell/repos","events_url":"https://api.github.com/users/ryanlrussell/events{/privacy}","received_events_url":"https://api.github.com/users/ryanlrussell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/p1up/sonicwall_firewall/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"p1up","id":20548379,"avatar_url":"https://avatars.githubusercontent.com/u/20548379?v=3","gravatar_id":"","url":"https://api.github.com/users/p1up","html_url":"https://github.com/p1up","followers_url":"https://api.github.com/users/p1up/followers","following_url":"https://api.github.com/users/p1up/following{/other_user}","gists_url":"https://api.github.com/users/p1up/gists{/gist_id}","starred_url":"https://api.github.com/users/p1up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p1up/subscriptions","organizations_url":"https://api.github.com/users/p1up/orgs","repos_url":"https://api.github.com/users/p1up/repos","events_url":"https://api.github.com/users/p1up/events{/privacy}","received_events_url":"https://api.github.com/users/p1up/received_events","type":"User","site_admin":false},"assignees":[{"login":"p1up","id":20548379,"avatar_url":"https://avatars.githubusercontent.com/u/20548379?v=3","gravatar_id":"","url":"https://api.github.com/users/p1up","html_url":"https://github.com/p1up","followers_url":"https://api.github.com/users/p1up/followers","following_url":"https://api.github.com/users/p1up/following{/other_user}","gists_url":"https://api.github.com/users/p1up/gists{/gist_id}","starred_url":"https://api.github.com/users/p1up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p1up/subscriptions","organizations_url":"https://api.github.com/users/p1up/orgs","repos_url":"https://api.github.com/users/p1up/repos","events_url":"https://api.github.com/users/p1up/events{/privacy}","received_events_url":"https://api.github.com/users/p1up/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-07-27T02:36:11Z","updated_at":"2016-07-27T08:19:33Z","closed_at":null,"body":"SonicWALL App 1.2.9\r\n\r\nI looks like none of your action parameters currently have a \"contains\" value. For example, your unblock ip action:\r\n\r\n{\r\n\t\t\"action\" : \"unblock ip\",\r\n\t\t\"description\": \"Unblock an ip\",\r\n\t\t\"type\" : \"correct\",\r\n\t\t\"identifier\": \"unblock_ip\",\r\n\t\t\"read_only\": false,\r\n\t\t\"parameters\": {\r\n\t\t\t\"target\": {\r\n\t\t\t\t\"description\": \"IP address to unblock\",\r\n\t\t\t\t\"data_type\": \"string\",\r\n\t\t\t\t\"contains\": [],\r\n\t\t\t\t\"primary\": true,\r\n\t\t\t\t\"required\": true\r\n\t\t\t}\r\n\r\nAdding a contains type for certain parameters will greatly enhance how parts of the Phantom UI work with your App, and make things convenient for Phantom users.\r\n\r\nThe \"contains\" value is how Phantom knows that an Artifact or output value from another action will work as input to one of your actions. For example, if I have an IP address in Mission Control, I can get a list of Actions that take an IP address as an Action parameter. It looks like this:\r\n\r\n![screen shot 2016-07-26 at 7 24 48 pm](https://cloud.githubusercontent.com/assets/1728937/17162004/e49d912c-5366-11e6-9ad0-9904629ea5f6.png)\r\n\r\nBecause I have (other) assets that provide a block ip action that takes an IP parameter, I get the \"block ip\" action in the context menu for an IP address. But when I continue, SonicWALL will be missing from the list of Assets that take an IP as a context item:\r\n\r\n![screen shot 2016-07-26 at 7 25 53 pm](https://cloud.githubusercontent.com/assets/1728937/17162033/1962b4e6-5367-11e6-8d0e-2494d08f2645.png)\r\n\r\nIf I change your JSON so that the block ip action has a contains field, like so:\r\n\r\n      {\r\n                \"action\": \"block ip\",\r\n                \"description\": \"Block an IP\",\r\n                \"type\" : \"contain\",\r\n                \"identifier\": \"block_ip\",\r\n                \"read_only\": false,\r\n                \"parameters\": {\r\n                        \"target\": {\r\n                                \"description\": \"IP address to block\",\r\n                                \"data_type\": \"string\",\r\n                                \"contains\": [ \"ip\" ],\r\n                                \"primary\": true,\r\n                                \"required\": true\r\n                        }\r\n                },\r\n\r\nThen SonicWALL Assets are now in the list:\r\n\r\n![screen shot 2016-07-26 at 7 30 20 pm](https://cloud.githubusercontent.com/assets/1728937/17162071/739897be-5367-11e6-8731-46d0873f4649.png)\r\n\r\nNote that \"contains\" takes a list of strings, which can of course just be a list of one string if that's all that's needed. Other Apps might need both \"ip\" and \"hostname\" as contains types for some parameters, but I think all of yours take just ip.\r\n\r\nFor your App, looks like you would want to use the following types:\r\n\r\n\"contains\": [ \"ip\" ],\r\n\"contains\": [ \"url\" ],\r\n\"contains\": [ \"network application\" ],\r\n\r\nFor both the block and unblock actions. \r\n\r\nAlso, I forgot to mention it in the other issue I filed, but if you make any changes, please remember to bump your version number up. Thanks!\r\n\r\nI don't think I have anything else. Really clean first rev!"}}
{"actor":{"display_login":"p1up"}}