16:00:01 #startmeeting Network Meeting 16:00:01 Meeting started Wed Jan 11 16:00:01 2017 UTC. The chair is gundalow. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:00:01 Useful Commands: #action #agreed #halp #info #idea #link #topic. 16:00:01 The meeting name has been set to 'network_meeting' 16:00:11 #chair Qalthos privateip andriusb 16:00:11 Current chairs: Qalthos andriusb gundalow privateip 16:00:27 Hello everyone! 16:00:37 bleep 16:00:41 * allanice001 waves 16:00:51 hello 16:01:12 * privateip creeps in and sits in corner 16:01:46 #info Agenda https://github.com/ansible/community/issues/110 16:02:21 oh no, I'm a char 16:02:21 #topic Adding Unit test dependencies ansible/pull/20034 16:02:31 #link https://github.com/ansible/ansible/pull/20034 16:02:36 Hello 16:02:36 ganeshnalawade: You around? 16:02:49 gundalow, yes just came in 16:02:49 Magic, responding before I ask :) 16:02:55 :) 16:03:10 So first of all, thank you for the test improvements 16:03:31 welcome 16:03:35 privateip: I believe you has some thoughts about adding dependencies in? 16:03:46 https://github.com/ansible/ansible/pull/20034/files#diff-0f71000b056cf3c2090a3c823c7ca88a 16:04:40 yeah i think my concern is a bit broad about if we are going to go down the path of including all external libraries in for testing if we aren't shipping them with Ansible 16:05:21 Sure, valid concern 16:05:21 if for instance junos-eznc is breaking test cases our unit tests are broke for all ansible yet it should have no material impact on if we ship code or not 16:05:55 i guess i would rather see mocked interfaces for unit tests 16:06:42 #chair rcarrillocruz 16:06:42 Current chairs: Qalthos andriusb gundalow privateip rcarrillocruz 16:06:43 but i feel like we should do it one way or the other and not mix and match 16:07:03 this might be a more applicable discuss for the core team meeting now that i think about it 16:08:05 privateip, junos.py check if junos-eznc is installed or not at the start hence I have to add it else testcase was failing 16:08:12 Matt Clay and I said we'd wait for your views before we discussed it anymore 16:08:38 as such testcase has no dependency on junos-eznc 16:09:52 so in theory we should be able to mock the import call no? 16:10:23 and then we dont need to include the libraries in the test requirements 16:10:45 if we need to refactor the module code a bit to make that happen im okay with that 16:10:48 yes that can be done...i did not thought about this 16:11:16 so for the PR lets take that approach 16:11:41 ok will make the changes in PR 16:11:41 Since I'm working on getting the Junos tests running in AWS so we can test with Shippable am happy with mocked out junos-eznc as we do testing with that there 16:12:01 #action ganeshnalawade to refactor PR 20034 to use mock external libraries 16:12:04 Is Junos the only networking platform where we use an external library 16:12:08 yes 16:12:18 Currently yes 16:12:39 privateip, gundalow thank you for the suggestion 16:12:40 For fortigate, you need to add pyfg 16:12:42 cool, thought so 16:13:05 #action mattclay and gundalow to bring up more generic test requirements in core meeting 16:13:18 +1 16:13:51 allanice001: Thanks for the info about fortigate 16:13:58 cool, next item then 16:14:04 allanice001: probably better to forget about pyfg, too much bug in rollback 16:14:42 Just mentioned it as an external lib that could be a future dependancy 16:14:43 #topic fortigate box management 16:14:54 sqweez123: over to you :) 16:15:05 hello all ! 16:15:13 pyfg is just an implementation on top of paramiko right? 16:15:27 I'm currently trying to add fortios box support in ansible 16:15:33 YAY 16:15:54 Another YAY 16:16:02 privateip: yes something like this 16:16:41 i need some help/doc to make this append 16:17:16 sure how can i help? 16:17:18 as i did not found correct library, i'll make one, but don't know where to begin 16:17:53 i understant that i need to create some provider in module-utils 16:18:24 so fortios is cli based right? 16:18:26 then i could benefit from networkmodule boilerplate 16:18:53 privateip: yes, there is some REST API, but not well supported 16:19:22 ok so in Ans2.3 we have added support for working with CLI driven devices 16:19:29 new connection plugin network_cli 16:19:47 that will handle the lower layer connective to the devie 16:19:51 *device 16:20:24 to handle setting up the environment and priviledge escalation (if needed) we have added a new terminal plugin 16:20:24 is there some simple sample of implementation ? 16:20:31 yes 16:20:33 look at ios 16:20:36 its done 16:21:00 you will need to write terminal plugin for fortios and put it into here https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/terminal 16:21:01 ios is based on new plugin ? 16:21:05 yes 16:21:10 in the devel branch it is 16:21:17 only in the devel branch 16:21:42 you can use https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/basics/net_command.py once you have the plugin done 16:21:45 to send commands 16:21:48 to confirm working 16:22:04 then you can develop declarative modules for fortios 16:22:22 see https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/ios/ios_system.py 16:22:25 and 16:22:36 here https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/ios.py 16:22:39 for examples 16:22:58 does that help to get you started? 16:23:15 you can ping me in ansible-devel as questions come up 16:24:12 seem's ok to me 16:24:24 Or me, though I not know the answers, however I may have seen a PR that does something similar by privateip that does similar 16:25:31 privateip: it could be cool to have some doc about that, i spend lot of time searching for these elements 16:25:49 good point 16:26:00 #action privateip to document new network_cli plugin 16:26:14 and for new module too, http://docs.ansible.com/ansible/dev_guide/developing_modules.html seems to be the only doc... 16:26:25 privateip: If you want to just throw stuff into gDocs I can take it from there 16:26:37 thanks gundalow 16:26:41 sqweez123: I've got a background task to completely write all of that 16:27:04 gundalow: great 16:27:45 as i'm not python expert nor ansible-devel expert, I can help you to find what's missing :) 16:28:24 allanice001 would you be able to help as well with this? 16:28:30 perhaps testing 16:28:38 sure 16:28:42 cool 16:29:04 sqweez123: allanice001 is a good reason in the community to bounce things off as well 16:29:10 resource** 16:29:12 xenol offer help testing too, and lot friends of mine 16:29:13 sheesh 16:29:22 Yup, and that's great. If you subscribe to https://github.com/ansible/community/issues/114 you will find out when I've done the new docs 16:29:25 ace :) 16:29:32 the more the better 16:29:38 ++ 16:29:42 our company is heavily invested in fortigate 16:29:55 hi rcarrillocruz ... welcome 16:30:05 So I got lots of gear and fgt heads to ask if stuck 16:30:10 o/ folks 16:30:14 We happy to move onto the next topic? 16:30:26 #topic rcarrillocruz 16:30:31 Over to you :) 16:30:35 heya folks 16:30:49 i'm ricardo carrillo cruz, tho everybody calls me ricky 16:30:53 i just joined ansible this week 16:30:57 the networking team in particular 16:31:15 hoping to get up to speed pretty soon and start contributing and fixing stuff :-) 16:31:26 i'm based in Spain (CET) 16:31:44 so folks in EMEA particularly you can find me on ansible-devel around those working hours 16:32:40 Cool, welcome !! +1 for EMEA 16:32:43 :) 16:32:59 thanks! :-) 16:33:47 +1 for EMEA, i'm in Paris 16:34:03 sqweez123: Are you going to Ansible Automates Paris? 16:34:14 * misc is in emea too 16:34:20 there's Ansible Automates Paris? 16:34:33 https://www.ansible.com/events 16:34:35 2nd Feb 16:35:05 damn 16:35:06 * gundalow will be there. Would be great to see you there 16:35:13 * misc will be in AMS 16:35:44 too bad, I could have spoke in french :) 16:36:05 We should be annoucing the main AnsibleFest soon 16:36:09 any future plans to have ansible events more south (Like South Africa?) 16:36:09 register seems closed 16:36:25 oh, maybe we hit the limit already 16:36:41 then, i'll not :( 16:37:17 #topic Open Floor 16:37:48 privateip, i have one question 16:38:07 ganeshnalawade: Sure 16:38:14 for ios modules NetworkModule class is replaced with LocalAnsibleModule class. 16:38:24 What's the reason for this change, also will same change apply to junos modules and other network modules? 16:38:51 yes LocalAnsibleModule replaces NetworkModule 16:39:09 the architecture moves from using SSH as an API to SSH as a connection plugin 16:39:18 subtle yet significant difference 16:40:18 ok so this change is applicable for all network modules? 16:40:30 this will allow two key things: 1) persistence across playbook run for ssh connections 2) integration with ansible connection plugin system instead of having to re-encod credentials at the task level 16:40:40 all that have a CLI connection 16:40:54 im hoping to get netconf connection plugin done too 16:40:57 working on it now 16:41:11 not sure its going to make 2.3 though 16:41:21 lots more to think about and work through 16:41:48 sounds cool 16:43:01 sounds cool to me too 16:43:14 Oh, and when you are finished I have one question 16:43:41 that answers my question ..thank you 16:43:56 COol 16:44:01 ganeshnalawade: https://github.com/ansible/ansible/pull/19038 16:44:11 Causes https://github.com/ansible/ansible/blob/devel/test/integration/targets/junos_config/tests/netconf/src_basic.yaml#L4 16:44:21 to fail with: {"msg": "update is merge but the following are missing: src", 16:45:08 So previously it was valid to have lines: without src: 16:45:48 gundalow, i have added required_if statement for update 16:46:01 aye, and that's what I'm hitting 16:46:49 this is expected behaviour right? 16:47:52 configuration statement should be present while running junos_config module 16:48:02 thats why i added this check 16:48:04 privateip: What do you think? 16:48:39 you've made src always be required 16:49:04 as update has three states, and you've listed those three states on line s349-351 16:49:25 ohh yes... 16:49:37 configs statement can be in lines as well 16:50:00 will raise a PR to fix this 16:50:34 +1 16:50:46 Thanks, if you could ping me the link once you've done so I'll retest and get it merged 16:50:55 sure 16:50:58 Anything else in the final 10 minutes? 16:51:32 if noone else, i have question 16:51:33 I think community outnumbered Ansible Staff today, which is great to see :) 16:51:37 sqweez123: sure 16:51:59 i'm looking for the best way to validate module.params values 16:52:41 check if something is valid ip address, or country code... 16:53:22 oh, interesting question 16:53:44 today that is up to the dev to implement ... means you need to write a function to validate the param value after you instantiate AnsibleModule (or LocalAnsibleModule) 16:54:10 AnsibleModule will type check the value but nothing further 16:54:29 privateip: today as in "it's in todo list" ? 16:54:45 no today is in the foreseeable future 16:54:56 xD 16:55:36 would be great to have some regexp, or function to set 16:55:56 we have tended to stay out of module developers way 16:56:10 one of the reasons why ansible is so broadly applicable 16:56:16 something like value = dict(type='str',required=True, validate_re='/a|b/'), 16:56:36 closests thing we have is choices= which is basically an 'enum type' 16:57:10 ok, i have my answer :) 16:57:58 I'm not sure if their are official regex for parsing, some a lot more complex than you think 16:58:44 andriusb: You there? 16:59:10 @gundalow yep 16:59:44 andriusb: Care to (re)introduce yourself as their are some new people in here 16:59:57 sqweez123, maybe look at https://validators.readthedocs.io/en/latest/ 17:00:44 thank's allanice001, I'll have a look ;) 17:00:45 sure thing! Howdy all, my name is Andrius Benokraitis and I joined Ansible last month. I'm primarily responsible for product management activities pertaining to networking with Ansible 17:02:41 sqweez123: not against having a validation added to it, but it wont cover all caes 17:02:53 Welcome andriusb 17:03:18 thanks all! :-) 17:03:34 back to you @gundalow 17:03:47 welcome andriusb :) 17:03:54 btw, there was a PR to add validation/more types for module params, https://github.com/ansible/ansible/pull/17731 17:04:05 while this has turned into an AA meeting :: 17:04:11 My name's Allan 17:04:12 it requires changes, but we had discussed `type` being a callable 17:04:18 Based in South Africa 17:04:18 HI ALLAN 17:04:48 :) 17:04:49 And I'm a dev-ops developer 17:04:50 ok,then I'm Benjamin from Paris 17:05:34 HI BENJAMIN! ;-) 17:05:42 * sqweez123 waves 17:06:05 gotta run, see you next time all! 17:06:07 ok guys, need to go, read you later ;) 17:06:16 cheers 17:06:21 cheers 17:07:37 :) 17:07:43 Cool, thanks everyone 17:08:37 Agenda for the other meetings https://github.com/ansible/community/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3Ameeting_agenda%20 17:08:47 Enjoy the rest of your day! 17:08:50 #endmeeting