[GitHub] libcloud pull request #1092: docs: PowerDNS 4.1 updates

2017-08-20 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/libcloud/pull/1092


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


libcloud git commit: docs: PowerDNS 4.1 updates

2017-08-20 Thread anthonyshaw
Repository: libcloud
Updated Branches:
  refs/heads/trunk 6464d8e93 -> 2071b581a


docs: PowerDNS 4.1 updates

The PowerDNS project hosts their latest HTTP API documentation at a
slightly different URL, and they've retired the "json-interface" setting
altogether. Update our pdns server configuration instructions to reflect
these changes.

Closes #1092


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/2071b581
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/2071b581
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/2071b581

Branch: refs/heads/trunk
Commit: 2071b581abf8fb8173f1fb7721eea25bf160807a
Parents: 6464d8e
Author: Ken Dreyer 
Authored: Fri Aug 18 11:08:03 2017 -0600
Committer: Anthony Shaw 
Committed: Mon Aug 21 15:38:40 2017 +1000

--
 docs/dns/drivers/powerdns.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/2071b581/docs/dns/drivers/powerdns.rst
--
diff --git a/docs/dns/drivers/powerdns.rst b/docs/dns/drivers/powerdns.rst
index 0dd41a2..1bc13e4 100644
--- a/docs/dns/drivers/powerdns.rst
+++ b/docs/dns/drivers/powerdns.rst
@@ -14,9 +14,9 @@ following in ``pdns.conf``::
 
 For PowerDNS 4.x, please read the `PowerDNS 4 HTTP API documentation`_. The
 ``pdns.conf`` options are slightly different (the options are no longer
-prefixed with ``experimental-``)::
+prefixed with ``experimental-``, and ``json-interface`` is no longer
+required.)::
 
-  json-interface=yes
   api-key=changeme
   webserver=yes
 
@@ -40,4 +40,4 @@ API Docs
 
 .. _`PowerDNS`: https://doc.powerdns.com/
 .. _`PowerDNS 3 HTTP API documentation`: 
https://doc.powerdns.com/3/httpapi/README/
-.. _`PowerDNS 4 HTTP API documentation`: 
https://doc.powerdns.com/md/httpapi/README/
+.. _`PowerDNS 4 HTTP API documentation`: 
https://doc.powerdns.com/authoritative/http-api/



[7/8] libcloud git commit: build docs with python 3

2017-08-20 Thread anthonyshaw
build docs with python 3


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/28bea530
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/28bea530
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/28bea530

Branch: refs/heads/trunk
Commit: 28bea53093e1165a69ba3b07793ba267d73712f9
Parents: ad33bf7
Author: Anthony Shaw 
Authored: Mon Aug 21 11:50:01 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 11:50:01 2017 +1000

--
 tox.ini | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/28bea530/tox.ini
--
diff --git a/tox.ini b/tox.ini
index b125b9e..a6c64df 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,7 +14,8 @@ commands = cp libcloud/test/secrets.py-dist 
libcloud/test/secrets.py
python setup.py test
 basepython =
 py2.6: python2.6
-{py2.7,lint,pylint,docs,coverage}: python2.7
+{py2.7,lint,pylint,coverage}: python2.7
+docs: python3.6
 pypypy: pypy
 pypypy3: pypy3
 py3.3: python3.3



[GitHub] libcloud pull request #1094: Fix build

2017-08-20 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/libcloud/pull/1094


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[2/8] libcloud git commit: build docs with python 3

2017-08-20 Thread anthonyshaw
build docs with python 3


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3899f91b
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3899f91b
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3899f91b

Branch: refs/heads/trunk
Commit: 3899f91b9947ff6d3e782c338cfd63d3ac010a35
Parents: a9a06e8
Author: Anthony Shaw 
Authored: Mon Aug 21 09:41:52 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 09:41:52 2017 +1000

--
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/3899f91b/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index a7e784f..8109850 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,7 +33,7 @@ matrix:
   python: 2.7
   before_script: TOX_ENV=coverage
 - env: ENV=docs
-  python: 2.7
+  python: 3.5
   before_script: TOX_ENV=docs-travis
   # Note: graphviz is needed for grapgs embedded in the docs
   addons:



[5/8] libcloud git commit: fix pricing reference

2017-08-20 Thread anthonyshaw
fix pricing reference


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5b6563dd
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5b6563dd
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5b6563dd

Branch: refs/heads/trunk
Commit: 5b6563dd45c192a59d3cc013393db287d95d7e18
Parents: 5dc4fd0
Author: Anthony Shaw 
Authored: Mon Aug 21 11:49:35 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 11:49:35 2017 +1000

--
 docs/compute/pricing.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5b6563dd/docs/compute/pricing.rst
--
diff --git a/docs/compute/pricing.rst b/docs/compute/pricing.rst
index 6050670..a01b879 100644
--- a/docs/compute/pricing.rst
+++ b/docs/compute/pricing.rst
@@ -14,7 +14,7 @@ Example below shows how to retrieve pricing for ``NodeSize`` 
objects using
 
 .. literalinclude:: /examples/compute/pricing.py
:language: python
-   :emphasize-lines: 11-19
+   :emphasize-lines: 11-18
 
 As noted above this pricing information is an estimate and should only
 be used as such. You should always check your provider website / control panel




[6/8] libcloud git commit: fix GKE reference

2017-08-20 Thread anthonyshaw
fix GKE reference


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/ad33bf7a
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/ad33bf7a
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/ad33bf7a

Branch: refs/heads/trunk
Commit: ad33bf7af95aa6c391ab00b9769fb28d20949287
Parents: 5b6563d
Author: Anthony Shaw 
Authored: Mon Aug 21 11:49:45 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 11:49:45 2017 +1000

--
 docs/container/drivers/gke.rst | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ad33bf7a/docs/container/drivers/gke.rst
--
diff --git a/docs/container/drivers/gke.rst b/docs/container/drivers/gke.rst
index 3edc473..61c0d6b 100644
--- a/docs/container/drivers/gke.rst
+++ b/docs/container/drivers/gke.rst
@@ -25,3 +25,4 @@ API Docs
 :members:
 :inherited-members:
 
+.. _`Google Container Platform`: https://cloud.google.com/container-engine/



[4/8] libcloud git commit: remove pysphere completely

2017-08-20 Thread anthonyshaw
remove pysphere completely


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5dc4fd0b
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5dc4fd0b
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5dc4fd0b

Branch: refs/heads/trunk
Commit: 5dc4fd0b219d3576fad58ebb6fcc085491162b33
Parents: 76814c1
Author: Anthony Shaw 
Authored: Mon Aug 21 11:49:03 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 11:49:03 2017 +1000

--
 contrib/generate_provider_feature_matrix_table.py | 8 
 1 file changed, 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5dc4fd0b/contrib/generate_provider_feature_matrix_table.py
--
diff --git a/contrib/generate_provider_feature_matrix_table.py 
b/contrib/generate_provider_feature_matrix_table.py
index 34e6694..e9410aa 100755
--- a/contrib/generate_provider_feature_matrix_table.py
+++ b/contrib/generate_provider_feature_matrix_table.py
@@ -55,14 +55,6 @@ from libcloud.backup.providers import get_driver as 
get_backup_driver
 from libcloud.backup.providers import DRIVERS as BACKUP_DRIVERS
 from libcloud.backup.types import Provider as BackupProvider
 
-try:
-import pysphere  # noqa
-except ImportError:
-
-class PySphere(object):
-pass
-
-sys.modules['pysphere'] = PySphere
 
 HEADER = ('.. NOTE: This file has been generated automatically using '
   'generate_provider_feature_matrix_table.py script, don\'t manually '



[8/8] libcloud git commit: use py3.5

2017-08-20 Thread anthonyshaw
use py3.5


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6464d8e9
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6464d8e9
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6464d8e9

Branch: refs/heads/trunk
Commit: 6464d8e93f24e1db45ef0b096226e41ee873b9ff
Parents: 28bea53
Author: Anthony Shaw 
Authored: Mon Aug 21 12:21:52 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 12:21:52 2017 +1000

--
 tox.ini | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/6464d8e9/tox.ini
--
diff --git a/tox.ini b/tox.ini
index a6c64df..05475c7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,7 +15,7 @@ commands = cp libcloud/test/secrets.py-dist 
libcloud/test/secrets.py
 basepython =
 py2.6: python2.6
 {py2.7,lint,pylint,coverage}: python2.7
-docs: python3.6
+docs: python3.5
 pypypy: pypy
 pypypy3: pypy3
 py3.3: python3.3



[3/8] libcloud git commit: fix indents in changelog

2017-08-20 Thread anthonyshaw
fix indents in changelog


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/76814c17
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/76814c17
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/76814c17

Branch: refs/heads/trunk
Commit: 76814c172d0596e7cb7b7800248addf4c62dd497
Parents: 3899f91
Author: Anthony Shaw 
Authored: Mon Aug 21 11:48:50 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 11:48:50 2017 +1000

--
 CHANGES.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/76814c17/CHANGES.rst
--
diff --git a/CHANGES.rst b/CHANGES.rst
index 65172f7..8d65901 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -86,7 +86,7 @@ Compute
   (Anthony Shaw)
 
 - [GCE] Add loadBalancingScheme parameter for
- ex_create_forwarding_rule method in GCE driver.
+  ex_create_forwarding_rule method in GCE driver.
   [GITHUB-1079]
   (@sT331h0rs3)
 



[1/8] libcloud git commit: remove blank line

2017-08-20 Thread anthonyshaw
Repository: libcloud
Updated Branches:
  refs/heads/trunk f5e11c5f4 -> 6464d8e93


remove blank line


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/a9a06e8a
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/a9a06e8a
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/a9a06e8a

Branch: refs/heads/trunk
Commit: a9a06e8ab27782aec39087c3385bd62d6eae0422
Parents: f5e11c5
Author: Anthony Shaw 
Authored: Mon Aug 21 09:40:00 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 09:40:00 2017 +1000

--
 libcloud/test/dns/test_linode.py | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/a9a06e8a/libcloud/test/dns/test_linode.py
--
diff --git a/libcloud/test/dns/test_linode.py b/libcloud/test/dns/test_linode.py
index 72da66c..678149d 100644
--- a/libcloud/test/dns/test_linode.py
+++ b/libcloud/test/dns/test_linode.py
@@ -76,7 +76,6 @@ class LinodeTests(unittest.TestCase):
 self.assertHasKeys(srvrecord.extra, ['protocol', 'ttl_sec', 'port',
  'priority', 'weight'])
 
-
 def test_list_records_zone_does_not_exist(self):
 zone = self.driver.list_zones()[0]
 



[GitHub] libcloud pull request #1094: Fix build

2017-08-20 Thread tonybaloney
GitHub user tonybaloney opened a pull request:

https://github.com/apache/libcloud/pull/1094

Fix build

Lint error and issue with building docs on the travis environment (I added 
support for Python 3 last month).

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/tonybaloney/libcloud fix_build

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/libcloud/pull/1094.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1094


commit a9a06e8ab27782aec39087c3385bd62d6eae0422
Author: Anthony Shaw 
Date:   2017-08-20T23:40:00Z

remove blank line

commit 3899f91b9947ff6d3e782c338cfd63d3ac010a35
Author: Anthony Shaw 
Date:   2017-08-20T23:41:52Z

build docs with python 3




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (LIBCLOUD-875) Route 53 driver formats TXT records incorrectly

2017-08-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LIBCLOUD-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16134596#comment-16134596
 ] 

ASF subversion and git services commented on LIBCLOUD-875:
--

Commit b3b5086d19baa585af4987b0e32e7fdbe595ea5a in libcloud's branch 
refs/heads/trunk from [~anthonypjshaw]
[ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=b3b5086 ]

create tests to validate LIBCLOUD-875


> Route 53 driver formats TXT records incorrectly
> ---
>
> Key: LIBCLOUD-875
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-875
> Project: Libcloud
>  Issue Type: Bug
>  Components: DNS
>Reporter: Tristan Seligmann
>
> Route 53 expects the values of TXT records to be wrapped in quotation marks 
> ("value"), but the driver does not add these for you.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (LIBCLOUD-875) Route 53 driver formats TXT records incorrectly

2017-08-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LIBCLOUD-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16134597#comment-16134597
 ] 

ASF GitHub Bot commented on LIBCLOUD-875:
-

Github user asfgit closed the pull request at:

https://github.com/apache/libcloud/pull/1093


> Route 53 driver formats TXT records incorrectly
> ---
>
> Key: LIBCLOUD-875
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-875
> Project: Libcloud
>  Issue Type: Bug
>  Components: DNS
>Reporter: Tristan Seligmann
>
> Route 53 expects the values of TXT records to be wrapped in quotation marks 
> ("value"), but the driver does not add these for you.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[1/4] libcloud git commit: create tests to validate LIBCLOUD-875

2017-08-20 Thread anthonyshaw
Repository: libcloud
Updated Branches:
  refs/heads/trunk 95b087fd4 -> f5e11c5f4


create tests to validate LIBCLOUD-875


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b3b5086d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b3b5086d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b3b5086d

Branch: refs/heads/trunk
Commit: b3b5086d19baa585af4987b0e32e7fdbe595ea5a
Parents: 95b087f
Author: Anthony Shaw 
Authored: Mon Aug 21 08:55:16 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 08:55:16 2017 +1000

--
 libcloud/test/dns/test_route53.py | 60 ++
 1 file changed, 60 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b3b5086d/libcloud/test/dns/test_route53.py
--
diff --git a/libcloud/test/dns/test_route53.py 
b/libcloud/test/dns/test_route53.py
index 1692f22..315ea23 100644
--- a/libcloud/test/dns/test_route53.py
+++ b/libcloud/test/dns/test_route53.py
@@ -168,6 +168,66 @@ class Route53Tests(unittest.TestCase):
 self.assertEqual(record.type, RecordType.A)
 self.assertEqual(record.data, '127.0.0.1')
 
+def test_create_TXT_record(self):
+"""
+Check that TXT records are created in quotes
+"""
+zone = self.driver.list_zones()[0]
+record = self.driver.create_record(
+name='', zone=zone,
+type=RecordType.TXT, data='test'
+)
+self.assertEqual(record.id, 'TXT:')
+self.assertEqual(record.name, '')
+self.assertEqual(record.zone, zone)
+self.assertEqual(record.type, RecordType.TXT)
+self.assertEqual(record.data, '"test"')
+
+def test_create_TXT_record_quoted(self):
+"""
+Check that TXT values already quoted are not changed
+"""
+zone = self.driver.list_zones()[0]
+record = self.driver.create_record(
+name='', zone=zone,
+type=RecordType.TXT, data='"test"'
+)
+self.assertEqual(record.id, 'TXT:')
+self.assertEqual(record.name, '')
+self.assertEqual(record.zone, zone)
+self.assertEqual(record.type, RecordType.TXT)
+self.assertEqual(record.data, '"test"')
+
+def test_create_SPF_record(self):
+"""
+Check that SPF records are created in quotes
+"""
+zone = self.driver.list_zones()[0]
+record = self.driver.create_record(
+name='', zone=zone,
+type=RecordType.SPF, data='test'
+)
+self.assertEqual(record.id, 'SPF:')
+self.assertEqual(record.name, '')
+self.assertEqual(record.zone, zone)
+self.assertEqual(record.type, RecordType.SPF)
+self.assertEqual(record.data, '"test"')
+
+def test_create_SPF_record_quoted(self):
+"""
+Check that SPF values already quoted are not changed
+"""
+zone = self.driver.list_zones()[0]
+record = self.driver.create_record(
+name='', zone=zone,
+type=RecordType.SPF, data='"test"'
+)
+self.assertEqual(record.id, 'SPF:')
+self.assertEqual(record.name, '')
+self.assertEqual(record.zone, zone)
+self.assertEqual(record.type, RecordType.SPF)
+self.assertEqual(record.data, '"test"')
+
 def test_create_multi_value_record(self):
 zone = self.driver.list_zones()[0]
 records = self.driver.ex_create_multi_value_record(



[3/4] libcloud git commit: add support for escaping quotes

2017-08-20 Thread anthonyshaw
add support for escaping quotes


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/a7da273d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/a7da273d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/a7da273d

Branch: refs/heads/trunk
Commit: a7da273d6f91471d25c2ab524a92a88a052c39f9
Parents: 8041ca2
Author: Anthony Shaw 
Authored: Mon Aug 21 09:09:25 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 09:09:25 2017 +1000

--
 libcloud/dns/drivers/route53.py   |  2 +-
 libcloud/test/dns/test_route53.py | 15 +++
 2 files changed, 16 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/a7da273d/libcloud/dns/drivers/route53.py
--
diff --git a/libcloud/dns/drivers/route53.py b/libcloud/dns/drivers/route53.py
index 6632cd3..3b73379 100644
--- a/libcloud/dns/drivers/route53.py
+++ b/libcloud/dns/drivers/route53.py
@@ -561,4 +561,4 @@ class Route53DNSDriver(DNSDriver):
 def _quote_data(self, data):
 if data[0] == '"' and data[-1] == '"':
 return data
-return '"{0}"'.format(data)
+return '"{0}"'.format(data.replace('"', '\"'))

http://git-wip-us.apache.org/repos/asf/libcloud/blob/a7da273d/libcloud/test/dns/test_route53.py
--
diff --git a/libcloud/test/dns/test_route53.py 
b/libcloud/test/dns/test_route53.py
index 315ea23..9658c32 100644
--- a/libcloud/test/dns/test_route53.py
+++ b/libcloud/test/dns/test_route53.py
@@ -228,6 +228,21 @@ class Route53Tests(unittest.TestCase):
 self.assertEqual(record.type, RecordType.SPF)
 self.assertEqual(record.data, '"test"')
 
+def test_create_TXT_record_escaped(self):
+"""
+Check that TXT record with quotes inside are escaped correctly
+"""
+zone = self.driver.list_zones()[0]
+record = self.driver.create_record(
+name='', zone=zone,
+type=RecordType.TXT, data='test "with"'
+)
+self.assertEqual(record.id, 'TXT:')
+self.assertEqual(record.name, '')
+self.assertEqual(record.zone, zone)
+self.assertEqual(record.type, RecordType.TXT)
+self.assertEqual(record.data, '"test \"with\""')
+
 def test_create_multi_value_record(self):
 zone = self.driver.list_zones()[0]
 records = self.driver.ex_create_multi_value_record(



[4/4] libcloud git commit: changes for #1093

2017-08-20 Thread anthonyshaw
changes for #1093


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/f5e11c5f
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/f5e11c5f
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/f5e11c5f

Branch: refs/heads/trunk
Commit: f5e11c5f418fb8675724747ce7f85b7cf9b81d8c
Parents: a7da273
Author: Anthony Shaw 
Authored: Mon Aug 21 09:31:58 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 09:31:58 2017 +1000

--
 CHANGES.rst | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/f5e11c5f/CHANGES.rst
--
diff --git a/CHANGES.rst b/CHANGES.rst
index 6a1475b..65172f7 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -32,6 +32,11 @@ Container
 DNS
 ~~~
 
+- [ROUTE53] Fix for TXT and SPF records, when user didn't escapsulate data in 
quotes, 
+  the API would fire error. As reported by @glyph
+  [LIBCLOUD-875, GITHUB-1093]
+  (Anthony Shaw)
+
 - [LINODE] Add priority to the extra dictionary in record instances
   [GITHUB-1088]
   (@mete0r)



[2/4] libcloud git commit: add most basic fix

2017-08-20 Thread anthonyshaw
add most basic fix


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8041ca25
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8041ca25
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8041ca25

Branch: refs/heads/trunk
Commit: 8041ca2580a4c632d3e28c092a7ced9905a0ac2c
Parents: b3b5086
Author: Anthony Shaw 
Authored: Mon Aug 21 09:06:17 2017 +1000
Committer: Anthony Shaw 
Committed: Mon Aug 21 09:06:17 2017 +1000

--
 libcloud/dns/drivers/route53.py | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8041ca25/libcloud/dns/drivers/route53.py
--
diff --git a/libcloud/dns/drivers/route53.py b/libcloud/dns/drivers/route53.py
index c378f00..6632cd3 100644
--- a/libcloud/dns/drivers/route53.py
+++ b/libcloud/dns/drivers/route53.py
@@ -188,6 +188,8 @@ class Route53DNSDriver(DNSDriver):
 return response.status in [httplib.OK]
 
 def create_record(self, name, zone, type, data, extra=None):
+if type in (RecordType.TXT, RecordType.SPF):
+data = self._quote_data(data)
 extra = extra or {}
 batch = [('CREATE', name, type, data, extra)]
 self._post_changeset(zone, batch)
@@ -555,3 +557,8 @@ class Route53DNSDriver(DNSDriver):
 kwargs = super(Route53DNSDriver, self)._ex_connection_class_kwargs()
 kwargs['token'] = self.token
 return kwargs
+
+def _quote_data(self, data):
+if data[0] == '"' and data[-1] == '"':
+return data
+return '"{0}"'.format(data)



[GitHub] libcloud pull request #1093: LIBCLOUD-875 fix route 53 DNS quote encapsulati...

2017-08-20 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/libcloud/pull/1093


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (LIBCLOUD-875) Route 53 driver formats TXT records incorrectly

2017-08-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LIBCLOUD-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16134587#comment-16134587
 ] 

ASF GitHub Bot commented on LIBCLOUD-875:
-

GitHub user tonybaloney opened a pull request:

https://github.com/apache/libcloud/pull/1093

LIBCLOUD-875 fix route 53 DNS quote encapsulation

## fix route 53 DNS quote encapsulation

Amazon's API stipulates that SPF and TXT records have quotes 
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#TXTFormat
The driver does not have any special casing for these records. I assume 
that existing users either:
- Get an error - see https://github.com/twisted/txacme/issues/120
- Add quotes before calling the methods, in which case this behaviour 
should be supported

For more information on contributing, please see 
[Contributing](http://libcloud.readthedocs.org/en/latest/development.html#contributing)
section of our documentation.

### Status

- work in progress

### Checklist (tick everything that applies)

- [ ] [Code 
linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
 (required, can be done after the PR checks)
- [ ] Documentation
- [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
- [ ] 
[ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes)
 (required for bigger changes)


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/tonybaloney/libcloud route53_formatting

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/libcloud/pull/1093.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1093


commit b3b5086d19baa585af4987b0e32e7fdbe595ea5a
Author: Anthony Shaw 
Date:   2017-08-20T22:55:16Z

create tests to validate LIBCLOUD-875




> Route 53 driver formats TXT records incorrectly
> ---
>
> Key: LIBCLOUD-875
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-875
> Project: Libcloud
>  Issue Type: Bug
>  Components: DNS
>Reporter: Tristan Seligmann
>
> Route 53 expects the values of TXT records to be wrapped in quotation marks 
> ("value"), but the driver does not add these for you.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] libcloud pull request #1093: LIBCLOUD-875 fix route 53 DNS quote encapsulati...

2017-08-20 Thread tonybaloney
GitHub user tonybaloney opened a pull request:

https://github.com/apache/libcloud/pull/1093

LIBCLOUD-875 fix route 53 DNS quote encapsulation

## fix route 53 DNS quote encapsulation

Amazon's API stipulates that SPF and TXT records have quotes 
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#TXTFormat
The driver does not have any special casing for these records. I assume 
that existing users either:
- Get an error - see https://github.com/twisted/txacme/issues/120
- Add quotes before calling the methods, in which case this behaviour 
should be supported

For more information on contributing, please see 
[Contributing](http://libcloud.readthedocs.org/en/latest/development.html#contributing)
section of our documentation.

### Status

- work in progress

### Checklist (tick everything that applies)

- [ ] [Code 
linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
 (required, can be done after the PR checks)
- [ ] Documentation
- [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
- [ ] 
[ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes)
 (required for bigger changes)


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/tonybaloney/libcloud route53_formatting

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/libcloud/pull/1093.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1093


commit b3b5086d19baa585af4987b0e32e7fdbe595ea5a
Author: Anthony Shaw 
Date:   2017-08-20T22:55:16Z

create tests to validate LIBCLOUD-875




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---