Re: [openwisp] [GSoC'19] OpenWisp Template share feature and Template Library

2019-07-12 Thread Federico Capoano
On Fri, Jul 12, 2019 at 4:51 PM Noumbissi Valere 
wrote:

> Good day mentors.
>
> *Weekly Report*
>
> I worked on the following PRs.
>
> PR 8 backend
> .
> in which i created the directory structure of library backend, implemented
> socail and local login and enable APIs for CRUD of organizations from
> openwisp_users, external_template creation, get detail template and
> functionality to list and search for templates from openwisp_controller.
> With these, I think i have exhausted the objectives of this backend as per
> the the project idea page. (waiting for review).
>

I've added some comments.


> PR 81 CRUD org .
> Implemented API to list, create, update, delete and get details for a
> particular organization. (waiting for review)
>

Did we say we would do this in openwisp-users? I think you can do that in
the template library backend for the moment.


> PR 115 create template
> . Moved API to
> create external templates from django_netjsonconfig to openwisp_controller.
> (waiting for review)
>
>
I've added some comments and requested changes.


> *Next work.*
> Next week, i intend to
>
>- perform changes requested by mentors if any
>- begin with the creation of the library frontend
>
>
Great.

Thanks
Federico

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAERYH6U8qSKxryB3wCuMW0ra_Yghhz%3DDddShba0XRj876vS32g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [openwisp] Re: [GSoC'19] Dockerize of OpenWISP

2019-07-12 Thread Federico Capoano
On Fri, Jul 12, 2019 at 2:48 PM Ajay Tripathi  wrote:

> Hi,
>
> *Weekly update:*
>
> 1. Worked on freeradius image and a draft pull request is available here:
> https://github.com/openwisp/docker-openwisp/pull/44
> 2. Worked on OpenVPN image and branch is available here:
> https://github.com/atb00ker/docker-openwisp/tree/openvpn
>
> *Next Week:*
>
> 1. Completing OpenVPN and making the pull request.
> 2. Working on the Celery image (again).
>
> *Action required:*
>
> 1. Please let me know about the expected default configurations for the
> OpenVPN. (Currently working on dummy configurations.)
>

A management VPN using tun mode, no encryption, TCP mode, server mode, TLS,
here's an example config:

auth SHA1
ca ca.pem
cert cert.pem
cipher none
comp-lzo no
dev tun0
dev-type tun
dh dh.pem
fast-io
group openvpn
keepalive 10 120
key key.pem
log /var/log/openvpn/management.log
mode server
mssfix 1450
mtu-disc no
persist-key
persist-tun
port 1194
proto udp
script-security 1
server 10.8.0.0 255.255.255.0
status /var/log/openvpn/management.status
status-version 1
tls-server
topology p2p
user nobody
verb 3


> 2. #42 is open for review:
> https://github.com/openwisp/docker-openwisp/pull/42
>

Added some comments.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAERYH6X7_kmWUgmSys4jZdZt-xGXY8mcSJwZiKtjUoX9VG3X%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [openwisp] Re: Error Installing OpenWISP2 on Raspbian Jessie

2019-07-12 Thread Federico Capoano
I'm not sure why it's happening, even after looking on Google it's not
clear to me what that error means exactly.

On Fri, Jul 12, 2019 at 2:10 PM M Ricky Anggoro P 
wrote:

> Thanks for your very fast response :)
> After I followed your suggest, i'm still got my error:
>
> pi@ricky:~ $ cd /opt/openwisp2/
> pi@ricky:/opt/openwisp2 $ ls
> env
> pi@ricky:/opt/openwisp2 $ source env/bin/activate
> (env)pi@ricky:/opt/openwisp2 $ pip install cryptography
> DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the
> last one supporting it. Please upgrade your Python as Python 3.4 won't be
> maintained after March 2019 (cf PEP 429).
> Collecting cryptography
>   Using cached
> https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz
>   Installing build dependencies ... done
>   Getting requirements to build wheel ... done
> ERROR: Exception:
> Traceback (most recent call last):
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py",
> line 178, in main
> status = self.run(options, args)
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/commands/install.py",
> line 352, in run
> resolver.resolve(requirement_set)
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py",
> line 131, in resolve
> self._resolve_one(requirement_set, req)
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py",
> line 294, in _resolve_one
> abstract_dist = self._get_abstract_dist_for(req_to_install)
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py",
> line 242, in _get_abstract_dist_for
> self.require_hashes
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py",
> line 362, in prepare_linked_requirement
> abstract_dist.prep_for_dist(finder, self.build_isolation)
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py",
> line 169, in prep_for_dist
> self.install_backend_dependencies(finder=finder)
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py",
> line 123, in install_backend_dependencies
> reqs = req.pep517_backend.get_requires_for_build_wheel()
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py",
> line 71, in get_requires_for_build_wheel
> 'config_settings': config_settings
>   File
> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py",
> line 162, in _call_hook
> raise BackendUnavailable
> pip._vendor.pep517.wrappers.BackendUnavailable
>
>
> Pada Sabtu, 13 Juli 2019 01.03.04 UTC+7, Federico Capoano menulis:
>>
>> To install cryptography manually you should do it in the python virtual
>> environment used by openwisp:
>>
>> cd /opt/openwisp2
>> source env/bin/activate
>> pip install cryptography
>>
>> Try this and let me know if it solves it.
>>
>> Best regards
>> Fed
>>
>> On Fri, Jul 12, 2019 at 1:58 PM M Ricky Anggoro P 
>> wrote:
>>
>>> This is my hosts file:
>>> [pi]
>>> 10.33.109.247
>>>
>>> And this is my playbook.yml:
>>> - hosts : pi
>>>   become: true
>>>   become_user: root
>>>   roles :
>>> - openwisp.openwisp2
>>>   vars:
>>> openwisp2_shared_secret: 12345678
>>> postfix_myhostname: localhost
>>>
>>>
>>> Pada Sabtu, 13 Juli 2019 00.56.27 UTC+7, M Ricky Anggoro P menulis:

 Hello, I'm still newbie on OpenWISP2 and Ansible. I had some trouble on
 installing OpenWISP2 on Raspbian Jessie with ansbile playbook. This is my
 error line:

 --
 TASK [openwisp.openwisp2 : Update pip & related tools]
 ***
 ok: [10.33.109.247]

 TASK [openwisp.openwisp2 : Install cryptography from pip]
 
 fatal: [10.33.109.247]: FAILED! => {"changed": false, "cmd":
 ["/opt/openwisp2/env/bin/pip", "install", "-U", "cryptography"], "msg":
 "stdout: Collecting cryptography\n  Using cached
 https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz\n
 Installing build dependencies: started\n  Installing build dependencies:
 finished with status 'done'\n  Getting requirements to build wheel:
 started\n  Getting requirements to build wheel: finished with status
 'done'\n\n:stderr: DEPRECATION: Python 3.4 support has been deprecated. pip
 19.1 will be the last one supporting it. Please upgrade your Python as
 Python 3.4 won't be maintained after March 2019 (cf PEP 429).\nERROR:
 Exception:\nTraceback (most recent call last):\n  File
 \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py\",
 line 178, in main\nstatus = self.run(options, args)\n  File
 

Re: [openwisp] [GSoC'19] OpenWisp Template share feature and Template Library

2019-07-12 Thread Noumbissi Valere
Good day mentors.

*Weekly Report*

I worked on the following PRs.

PR 8 backend
. in
which i created the directory structure of library backend, implemented
socail and local login and enable APIs for CRUD of organizations from
openwisp_users, external_template creation, get detail template and
functionality to list and search for templates from openwisp_controller.
With these, I think i have exhausted the objectives of this backend as per
the the project idea page. (waiting for review).

PR 81 CRUD org .
Implemented API to list, create, update, delete and get details for a
particular organization. (waiting for review)

PR 115 create template
. Moved API to
create external templates from django_netjsonconfig to openwisp_controller.
(waiting for review)

*Next work.*
Next week, i intend to

   - perform changes requested by mentors if any
   - begin with the creation of the library frontend



On Fri, Jul 5, 2019 at 7:44 PM Noumbissi Valere 
wrote:

> Good day mentors;
>
> *weekly report*
> This is week, i worked on the following issues.
> - PR 119. serialization API
>  (waiting for
> review)
> - PR 123. import logic
>  (waiting for
> review)
>I enhanced the API for serialization and import logic so that other
> apps like openwisp-controller can use it without issues.
> - PR 113.  This
> PR  added the serialization API and import logic from django_netjsonconfig
> to openwisp-controller (waiting for review)
> - notification model.
> 
>  This
> PR handles subscription notifications to template designers
> - PR 114.  Adds
> the notification features from django_netjsonconfig to openwisp-controller
> - API for external template creation
> .
> This adds the base API for external template creation which will be used at
> the template library backend (waiting for review)
>
> *Difficulties:*
> - I am facing some issues with celery. i have done the setup as stated in
> the documentation. but yet for me to work on the *notification model PR*,
> i had to open extra terminals on which i ran the worker and the beat
> process. without these, the celery will not behave as it opt to. I don't
> think this is what will be done in production.
> Secondly when i made this functionality present in openwisp-controller in *PR
> 114*, the celery tasks didn't work as expected.
> I am unable to figure out what the problem is.
> Please can someone look at the PRs and tell me what am doing wrong? thanks.
>
> *Next week:*
> I plan to work on openwisp-users repo to add APis for CRUD of organization
> and user
>
>
>
> On Sat, Jun 29, 2019 at 12:32 AM Noumbissi Valere <
> noumbissival...@gmail.com> wrote:
>
>> *Weekly Update*
>>
>> This week, I worked on the notification model and the celery APIs for
>> notifications.
>> * what can be done now*
>> As of this PR, it is possible for admins to
>> -Receive notifications when a user imports their templates
>> -Receive notifications when user delete their templates
>> -Users who import templates get the contents of their templates
>> periodically synchronized and a notification send to the designer to
>> indicate last synchronized date.
>>
>> here is the PR:
>> Notification model
>> 
>>
>> *What to do next*
>> - Perform changes which may be requested by mentors.
>> - work solve the *ModuleNotFoundErrror* on openwisp_controller in order
>> to make the APIs on django_netjsonconfig available to openwisp_controller.
>>
>> On Sun, Jun 23, 2019 at 4:41 PM Federico Capoano <
>> federico.capo...@gmail.com> wrote:
>>
>>>
>>>
>>> On Fri, Jun 21, 2019 at 2:41 PM Noumbissi Valere <
>>> noumbissival...@gmail.com> wrote:
>>>
 *Weekly Report *
 During this week, i performed changes and optimized the following PRs
 as requested. And right now they are waiting for review.
 -PR 119 

>>>
>>> PR approved, you can go ahead.
>>>
>>>
 -PR 123 

>>>
>>> PR approved, you can go ahead.
>>>
>>>
 -PR 117 

>>>
>>>
>>>
>>>
 After these, I decided to make these APIs available to the
 openwisp_controller repo. But i still got the following error
 *RuntimeError: Model class django_x509.models.Ca
 

Re: [openwisp] Re: [GSoC'19] Dockerize of OpenWISP

2019-07-12 Thread Ajay Tripathi
Hi,

*Weekly update:*

1. Worked on freeradius image and a draft pull request is available here: 
https://github.com/openwisp/docker-openwisp/pull/44
2. Worked on OpenVPN image and branch is available here: 
https://github.com/atb00ker/docker-openwisp/tree/openvpn

*Next Week:*

1. Completing OpenVPN and making the pull request.
2. Working on the Celery image (again).

*Action required:*

1. Please let me know about the expected default configurations for the 
OpenVPN. (Currently working on dummy configurations.)
2. #42 is open for review: 
https://github.com/openwisp/docker-openwisp/pull/42


Best, 
Ajay Tripathi

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/8b6e5159-5a34-4ba7-b912-d5d5b350c9e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [openwisp] Re: Error Installing OpenWISP2 on Raspbian Jessie

2019-07-12 Thread M Ricky Anggoro P
Thanks for your very fast response :)
After I followed your suggest, i'm still got my error:

pi@ricky:~ $ cd /opt/openwisp2/
pi@ricky:/opt/openwisp2 $ ls
env
pi@ricky:/opt/openwisp2 $ source env/bin/activate
(env)pi@ricky:/opt/openwisp2 $ pip install cryptography
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the 
last one supporting it. Please upgrade your Python as Python 3.4 won't be 
maintained after March 2019 (cf PEP 429).
Collecting cryptography
  Using cached 
https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py",
 
line 178, in main
status = self.run(options, args)
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/commands/install.py",
 
line 352, in run
resolver.resolve(requirement_set)
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py", 
line 131, in resolve
self._resolve_one(requirement_set, req)
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py", 
line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py", 
line 242, in _get_abstract_dist_for
self.require_hashes
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py",
 
line 362, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py",
 
line 169, in prep_for_dist
self.install_backend_dependencies(finder=finder)
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py",
 
line 123, in install_backend_dependencies
reqs = req.pep517_backend.get_requires_for_build_wheel()
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py",
 
line 71, in get_requires_for_build_wheel
'config_settings': config_settings
  File 
"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py",
 
line 162, in _call_hook
raise BackendUnavailable
pip._vendor.pep517.wrappers.BackendUnavailable


Pada Sabtu, 13 Juli 2019 01.03.04 UTC+7, Federico Capoano menulis:
>
> To install cryptography manually you should do it in the python virtual 
> environment used by openwisp:
>
> cd /opt/openwisp2
> source env/bin/activate
> pip install cryptography
>
> Try this and let me know if it solves it.
>
> Best regards
> Fed
>
> On Fri, Jul 12, 2019 at 1:58 PM M Ricky Anggoro P  > wrote:
>
>> This is my hosts file:
>> [pi]
>> 10.33.109.247
>>
>> And this is my playbook.yml:
>> - hosts : pi
>>   become: true
>>   become_user: root
>>   roles : 
>> - openwisp.openwisp2
>>   vars:
>> openwisp2_shared_secret: 12345678
>> postfix_myhostname: localhost
>>
>>
>> Pada Sabtu, 13 Juli 2019 00.56.27 UTC+7, M Ricky Anggoro P menulis:
>>>
>>> Hello, I'm still newbie on OpenWISP2 and Ansible. I had some trouble on 
>>> installing OpenWISP2 on Raspbian Jessie with ansbile playbook. This is my 
>>> error line:
>>>
>>> --
>>> TASK [openwisp.openwisp2 : Update pip & related tools] 
>>> ***
>>> ok: [10.33.109.247]
>>>
>>> TASK [openwisp.openwisp2 : Install cryptography from pip] 
>>> 
>>> fatal: [10.33.109.247]: FAILED! => {"changed": false, "cmd": 
>>> ["/opt/openwisp2/env/bin/pip", "install", "-U", "cryptography"], "msg": 
>>> "stdout: Collecting cryptography\n  Using cached 
>>> https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz\n
>>>   
>>> Installing build dependencies: started\n  Installing build dependencies: 
>>> finished with status 'done'\n  Getting requirements to build wheel: 
>>> started\n  Getting requirements to build wheel: finished with status 
>>> 'done'\n\n:stderr: DEPRECATION: Python 3.4 support has been deprecated. pip 
>>> 19.1 will be the last one supporting it. Please upgrade your Python as 
>>> Python 3.4 won't be maintained after March 2019 (cf PEP 429).\nERROR: 
>>> Exception:\nTraceback (most recent call last):\n  File 
>>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py\",
>>>  
>>> line 178, in main\nstatus = self.run(options, args)\n  File 
>>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/commands/install.py\",
>>>  
>>> line 352, in run\nresolver.resolve(requirement_set)\n  File 
>>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\",
>>>  
>>> line 131, in resolve\n

Re: [openwisp] Device auto-rename conventions

2019-07-12 Thread Federico Capoano
Ok, so I have not understood the problem, are you referring to the fact
that the interface names on the router look weird to you?

On Thu, Jul 11, 2019 at 4:23 PM Stuart Trusty 
wrote:

> hi Federico,
>
> I am talking about changing internal device names like wlan0 or lan0, etc.
> in the router config.
>
> Thank you,
> Stuart
>
> On Thu, Jul 11, 2019, 4:11 AM Federico Capoano 
> wrote:
>
>> If the name of the device is not changed before registration, when the
>> device registers it will rename itself to its mac-address, eg:
>> "11-BB-22-CC-33-DD", this happens only when the device registers, after the
>> device is registered there's no automatic renaming.
>>
>> Fed
>>
>> On Sun, Jun 23, 2019 at 8:52 AM Stuart Trusty 
>> wrote:
>>
>>> Greetings,
>>>
>>> I am noticing that when I use openwisp-config-openssl - 0.4.5-2 from
>>> OpenWRT and have no files or config changes to distribute to the routers-
>>> that when the devices check in, they have their device names on the router
>>> changed to something that seems very arbitrary to me and that I did not
>>> solicit.  I am using some code that is married to my original device names-
>>> can someone explain the reasoning here, and/or document what the devices
>>> are going to be renamed to so I can use those moving forward, or tell me
>>> how this can be disabled and if it is necessary?
>>>
>>> Thank you,
>>> Stuart
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "OpenWISP" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to openwisp+unsubscr...@googlegroups.com.
>>> To view this discussion on the web, visit
>>> https://groups.google.com/d/msgid/openwisp/6cd06728-5995-4d3f-ab99-33b7611749b4%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OpenWISP" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/openwisp/TPTCja6AQ4Y/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> openwisp+unsubscr...@googlegroups.com.
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msgid/openwisp/CAERYH6V%3DfjLF8Rpgr_noB9v2L%2B695pqfUTNUwAN1Nf%2BPA-SMRA%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenWISP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openwisp+unsubscr...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/openwisp/CAL-%2BkyKD2zLAdzAtmrzPrKYqMYOHXde%3D9piirC5hT-xdHQz4Fw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAERYH6XGapPFd74Z0BKq%2BBGU2s0vWR03d2g8fH%2BS-Ntbc9Goew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [openwisp] Re: Error Installing OpenWISP2 on Raspbian Jessie

2019-07-12 Thread Federico Capoano
To install cryptography manually you should do it in the python virtual
environment used by openwisp:

cd /opt/openwisp2
source env/bin/activate
pip install cryptography

Try this and let me know if it solves it.

Best regards
Fed

On Fri, Jul 12, 2019 at 1:58 PM M Ricky Anggoro P 
wrote:

> This is my hosts file:
> [pi]
> 10.33.109.247
>
> And this is my playbook.yml:
> - hosts : pi
>   become: true
>   become_user: root
>   roles :
> - openwisp.openwisp2
>   vars:
> openwisp2_shared_secret: 12345678
> postfix_myhostname: localhost
>
>
> Pada Sabtu, 13 Juli 2019 00.56.27 UTC+7, M Ricky Anggoro P menulis:
>>
>> Hello, I'm still newbie on OpenWISP2 and Ansible. I had some trouble on
>> installing OpenWISP2 on Raspbian Jessie with ansbile playbook. This is my
>> error line:
>>
>> --
>> TASK [openwisp.openwisp2 : Update pip & related tools]
>> ***
>> ok: [10.33.109.247]
>>
>> TASK [openwisp.openwisp2 : Install cryptography from pip]
>> 
>> fatal: [10.33.109.247]: FAILED! => {"changed": false, "cmd":
>> ["/opt/openwisp2/env/bin/pip", "install", "-U", "cryptography"], "msg":
>> "stdout: Collecting cryptography\n  Using cached
>> https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz\n
>> Installing build dependencies: started\n  Installing build dependencies:
>> finished with status 'done'\n  Getting requirements to build wheel:
>> started\n  Getting requirements to build wheel: finished with status
>> 'done'\n\n:stderr: DEPRECATION: Python 3.4 support has been deprecated. pip
>> 19.1 will be the last one supporting it. Please upgrade your Python as
>> Python 3.4 won't be maintained after March 2019 (cf PEP 429).\nERROR:
>> Exception:\nTraceback (most recent call last):\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py\",
>> line 178, in main\nstatus = self.run(options, args)\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/commands/install.py\",
>> line 352, in run\nresolver.resolve(requirement_set)\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\",
>> line 131, in resolve\nself._resolve_one(requirement_set, req)\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\",
>> line 294, in _resolve_one\nabstract_dist =
>> self._get_abstract_dist_for(req_to_install)\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\",
>> line 242, in _get_abstract_dist_for\nself.require_hashes\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\",
>> line 362, in prepare_linked_requirement\n
>> abstract_dist.prep_for_dist(finder, self.build_isolation)\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\",
>> line 169, in prep_for_dist\n
>> self.install_backend_dependencies(finder=finder)\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\",
>> line 123, in install_backend_dependencies\nreqs =
>> req.pep517_backend.get_requires_for_build_wheel()\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py\",
>> line 71, in get_requires_for_build_wheel\n'config_settings':
>> config_settings\n  File
>> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py\",
>> line 162, in _call_hook\nraise
>> BackendUnavailable\npip._vendor.pep517.wrappers.BackendUnavailable\n"}
>>
>> PLAY RECAP
>> ***
>> 10.33.109.247  : ok=24   changed=0unreachable=0
>> failed=1skipped=40   rescued=0ignored=1
>>
>>
>> --
>> I Suggest that my Python version is deprecated, but I already upgrade
>> Python version to 3.6.3,
>>
>> [image: raspi.png]
>>
>>
>>
>> I also tried to install cryptography manually, like this:
>>
>> pi@ricky:~/Python-3.6.3 $ sudo pip install cryptography
>> Collecting cryptography
>>   Using cached
>> https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz
>>   Installing build dependencies ... done
>>   Getting requirements to build wheel ... done
>> Preparing wheel metadata ... done
>> Collecting six>=1.4.1 (from cryptography)
>>   Downloading
>> https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
>> Collecting cffi!=1.11.3,>=1.8 (from cryptography)
>>   Using cached
>> https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz
>> Collecting asn1crypto>=0.21.0 (from cryptography)
>>   

[openwisp] Re: Error Installing OpenWISP2 on Raspbian Jessie

2019-07-12 Thread M Ricky Anggoro P
This is my hosts file:
[pi]
10.33.109.247

And this is my playbook.yml:
- hosts : pi
  become: true
  become_user: root
  roles : 
- openwisp.openwisp2
  vars:
openwisp2_shared_secret: 12345678
postfix_myhostname: localhost


Pada Sabtu, 13 Juli 2019 00.56.27 UTC+7, M Ricky Anggoro P menulis:
>
> Hello, I'm still newbie on OpenWISP2 and Ansible. I had some trouble on 
> installing OpenWISP2 on Raspbian Jessie with ansbile playbook. This is my 
> error line:
>
> --
> TASK [openwisp.openwisp2 : Update pip & related tools] 
> ***
> ok: [10.33.109.247]
>
> TASK [openwisp.openwisp2 : Install cryptography from pip] 
> 
> fatal: [10.33.109.247]: FAILED! => {"changed": false, "cmd": 
> ["/opt/openwisp2/env/bin/pip", "install", "-U", "cryptography"], "msg": 
> "stdout: Collecting cryptography\n  Using cached 
> https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz\n
>   
> Installing build dependencies: started\n  Installing build dependencies: 
> finished with status 'done'\n  Getting requirements to build wheel: 
> started\n  Getting requirements to build wheel: finished with status 
> 'done'\n\n:stderr: DEPRECATION: Python 3.4 support has been deprecated. pip 
> 19.1 will be the last one supporting it. Please upgrade your Python as 
> Python 3.4 won't be maintained after March 2019 (cf PEP 429).\nERROR: 
> Exception:\nTraceback (most recent call last):\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py\",
>  
> line 178, in main\nstatus = self.run(options, args)\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/commands/install.py\",
>  
> line 352, in run\nresolver.resolve(requirement_set)\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\", 
> line 131, in resolve\nself._resolve_one(requirement_set, req)\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\", 
> line 294, in _resolve_one\nabstract_dist = 
> self._get_abstract_dist_for(req_to_install)\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\", 
> line 242, in _get_abstract_dist_for\nself.require_hashes\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\",
>  
> line 362, in prepare_linked_requirement\n
> abstract_dist.prep_for_dist(finder, self.build_isolation)\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\",
>  
> line 169, in prep_for_dist\n
> self.install_backend_dependencies(finder=finder)\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\",
>  
> line 123, in install_backend_dependencies\nreqs = 
> req.pep517_backend.get_requires_for_build_wheel()\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py\",
>  
> line 71, in get_requires_for_build_wheel\n'config_settings': 
> config_settings\n  File 
> \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py\",
>  
> line 162, in _call_hook\nraise 
> BackendUnavailable\npip._vendor.pep517.wrappers.BackendUnavailable\n"}
>
> PLAY RECAP 
> ***
> 10.33.109.247  : ok=24   changed=0unreachable=0
> failed=1skipped=40   rescued=0ignored=1   
>
>
> --
> I Suggest that my Python version is deprecated, but I already upgrade 
> Python version to 3.6.3,
>
> [image: raspi.png]
>
>
>
> I also tried to install cryptography manually, like this:
>
> pi@ricky:~/Python-3.6.3 $ sudo pip install cryptography
> Collecting cryptography
>   Using cached 
> https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz
>   Installing build dependencies ... done
>   Getting requirements to build wheel ... done
> Preparing wheel metadata ... done
> Collecting six>=1.4.1 (from cryptography)
>   Downloading 
> https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
> Collecting cffi!=1.11.3,>=1.8 (from cryptography)
>   Using cached 
> https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz
> Collecting asn1crypto>=0.21.0 (from cryptography)
>   Downloading 
> https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
>  
> (101kB)
>  || 102kB 1.8MB/s 
> Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography)
> Building wheels for 

[openwisp] Error Installing OpenWISP2 on Raspbian Jessie

2019-07-12 Thread M Ricky Anggoro P
Hello, I'm still newbie on OpenWISP2 and Ansible. I had some trouble on 
installing OpenWISP2 on Raspbian Jessie with ansbile playbook. This is my 
error line:

--
TASK [openwisp.openwisp2 : Update pip & related tools] 
***
ok: [10.33.109.247]

TASK [openwisp.openwisp2 : Install cryptography from pip] 

fatal: [10.33.109.247]: FAILED! => {"changed": false, "cmd": 
["/opt/openwisp2/env/bin/pip", "install", "-U", "cryptography"], "msg": 
"stdout: Collecting cryptography\n  Using cached 
https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz\n
  
Installing build dependencies: started\n  Installing build dependencies: 
finished with status 'done'\n  Getting requirements to build wheel: 
started\n  Getting requirements to build wheel: finished with status 
'done'\n\n:stderr: DEPRECATION: Python 3.4 support has been deprecated. pip 
19.1 will be the last one supporting it. Please upgrade your Python as 
Python 3.4 won't be maintained after March 2019 (cf PEP 429).\nERROR: 
Exception:\nTraceback (most recent call last):\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py\",
 
line 178, in main\nstatus = self.run(options, args)\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/commands/install.py\",
 
line 352, in run\nresolver.resolve(requirement_set)\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\", 
line 131, in resolve\nself._resolve_one(requirement_set, req)\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\", 
line 294, in _resolve_one\nabstract_dist = 
self._get_abstract_dist_for(req_to_install)\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\", 
line 242, in _get_abstract_dist_for\nself.require_hashes\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\",
 
line 362, in prepare_linked_requirement\n
abstract_dist.prep_for_dist(finder, self.build_isolation)\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\",
 
line 169, in prep_for_dist\n
self.install_backend_dependencies(finder=finder)\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\",
 
line 123, in install_backend_dependencies\nreqs = 
req.pep517_backend.get_requires_for_build_wheel()\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py\",
 
line 71, in get_requires_for_build_wheel\n'config_settings': 
config_settings\n  File 
\"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py\",
 
line 162, in _call_hook\nraise 
BackendUnavailable\npip._vendor.pep517.wrappers.BackendUnavailable\n"}

PLAY RECAP 
***
10.33.109.247  : ok=24   changed=0unreachable=0
failed=1skipped=40   rescued=0ignored=1   


--
I Suggest that my Python version is deprecated, but I already upgrade 
Python version to 3.6.3,

[image: raspi.png]



I also tried to install cryptography manually, like this:

pi@ricky:~/Python-3.6.3 $ sudo pip install cryptography
Collecting cryptography
  Using cached 
https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting six>=1.4.1 (from cryptography)
  Downloading 
https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting cffi!=1.11.3,>=1.8 (from cryptography)
  Using cached 
https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz
Collecting asn1crypto>=0.21.0 (from cryptography)
  Downloading 
https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
 
(101kB)
 || 102kB 1.8MB/s 
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography)
Building wheels for collected packages: cryptography
  Building wheel for cryptography (PEP 517) ... done
  Stored in directory: 
/root/.cache/pip/wheels/d0/02/96/64b1439e5409591b6b0294d1da2f66a4ae4f0548d1bdb225b7
Successfully built cryptography
Installing collected packages: six, pycparser, cffi, asn1crypto, 
cryptography
  Running setup.py install for cffi ... done
Successfully installed asn1crypto-0.24.0 cffi-1.12.3 cryptography-2.7 
pycparser-2.19 six-1.12.0


I got no idea what I should do to fix 

Re: [openwisp] Re: [OpenWisp-AP Registration] -: Device registration from backend via API/Script

2019-07-12 Thread Amit Goyal
Thanks a lot Federico for your help! I will start implementation as per 
your suggestion now . 

Regards
Amit

On Thursday, July 11, 2019 at 6:22:11 PM UTC+5:30, Federico Capoano wrote:
>
> On Thu, Jul 11, 2019 at 3:48 AM Amit Goyal  > wrote:
>
>> Hi Federico 
>>
>> Thanks for providing so details answer. Sure it will help me .
>>
>> One more query -: *Can we register device only with MAC address 
>> information* ? If we do device registration using HTTP resource , 
>> minimum information required is UUID and KEY or Shared_Secret . 
>>
>> Client does want to share shared_secret due to security reason and  UUID 
>> & Key is generated by Openwisp itself .  Is there way we can generate UUID 
>> & Key using Device Mac Address ? 
>>
>
> Not at the moment, but regarding the key, when using "consistent key 
> generation 
> ", 
> which is enabled by default, the key is generated consistently according to 
> the mac address and the shared secret.
> It means that the key is always the same for the same device. So if the 
> device flash is reset and it registers again it will use the same DB object.
>
> If you want to generate your own UUID and keys, instead of using the HTTP 
> resource you have to use the Django ORM to create Device and Config objects 
> manually, depends on your experience with django, for someone who has some 
> experience with Django and the django ORM, doing this is almost trivial, 
> you just need to understand how the base models of openwisp-controller work.
>
> Best regards
> Federico
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/137b887f-fb47-41a4-9c19-1db735681b23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.