Switch from pattern.en to inflect

Change-Id: Ice314b136b9f7fe58ca978885f43ce346d337f3e
diff --git a/VERSION b/VERSION
index 1b5105d..67da954 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.1.14
+2.1.15
diff --git a/containers/chameleon/Dockerfile.chameleon b/containers/chameleon/Dockerfile.chameleon
index c5bddd5..c37ef00 100644
--- a/containers/chameleon/Dockerfile.chameleon
+++ b/containers/chameleon/Dockerfile.chameleon
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/chameleon
-FROM xosproject/xos-base:2.1.14
+FROM xosproject/xos-base:2.1.15
 
 # xos-base already has protoc and dependencies installed
 
diff --git a/containers/xos/Dockerfile.client b/containers/xos/Dockerfile.client
index 693f806..363b5ae 100644
--- a/containers/xos/Dockerfile.client
+++ b/containers/xos/Dockerfile.client
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-client
-FROM xosproject/xos-libraries:2.1.14
+FROM xosproject/xos-libraries:2.1.15
 
 # Install XOS client
 COPY xos/xos_client /tmp/xos_client
diff --git a/containers/xos/Dockerfile.libraries b/containers/xos/Dockerfile.libraries
index 4e024e9..115fe03 100644
--- a/containers/xos/Dockerfile.libraries
+++ b/containers/xos/Dockerfile.libraries
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM xosproject/xos-base:2.1.14
+FROM xosproject/xos-base:2.1.15
 
 # Add libraries
 COPY lib /opt/xos/lib
diff --git a/containers/xos/Dockerfile.synchronizer-base b/containers/xos/Dockerfile.synchronizer-base
index 6d82d6e..9877367 100644
--- a/containers/xos/Dockerfile.synchronizer-base
+++ b/containers/xos/Dockerfile.synchronizer-base
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-synchronizer-base
-FROM xosproject/xos-client:2.1.14
+FROM xosproject/xos-client:2.1.15
 
 COPY xos/synchronizers/new_base /opt/xos/synchronizers/new_base
 COPY xos/xos/logger.py /opt/xos/xos/logger.py
diff --git a/containers/xos/Dockerfile.xos-core b/containers/xos/Dockerfile.xos-core
index d120388..653e7b9 100644
--- a/containers/xos/Dockerfile.xos-core
+++ b/containers/xos/Dockerfile.xos-core
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 # xosproject/xos-core
-FROM xosproject/xos-libraries:2.1.14
+FROM xosproject/xos-libraries:2.1.15
 
 # Install XOS
 ADD xos /opt/xos
diff --git a/containers/xos/pip_requested.txt b/containers/xos/pip_requested.txt
index 46f319d..60b06b0 100644
--- a/containers/xos/pip_requested.txt
+++ b/containers/xos/pip_requested.txt
@@ -1,6 +1,6 @@
 Django==1.11.11
 Jinja2==2.10
-Pattern==2.6
+inflect==1.0.1
 PyYAML==3.12
 Twisted==16.6.0
 Werkzeug==0.14.1
diff --git a/containers/xos/pip_requirements.txt b/containers/xos/pip_requirements.txt
index f4b3be5..dce794e 100644
--- a/containers/xos/pip_requirements.txt
+++ b/containers/xos/pip_requirements.txt
@@ -1,115 +1,108 @@
-Babel==2.5.3
-Django==1.11.11
-Jinja2==2.10
-MarkupSafe==1.0
-Paste==2.0.3
-PasteDeploy==1.5.2
-Pattern==2.6
-PyNaCl==1.2.1
-PyYAML==3.12
-Routes==2.4.1
-Twisted==16.6.0
-WebOb==1.7.4
-Werkzeug==0.14.1
-amqp==2.2.2
+amqp==2.3.2
 ansible==2.5.0
 appdirs==1.4.3
 asn1crypto==0.24.0
 astunparse==1.5.0
-attrs==17.4.0
+attrs==18.2.0
+Babel==2.6.0
 bcrypt==3.1.4
-cachetools==2.0.1
-certifi==2018.1.18
+cachetools==2.1.0
+certifi==2018.8.24
 cffi==1.11.5
 chardet==3.0.4
-cliff==2.11.0
-cmd2==0.8.2
+cliff==2.13.0
+cmd2==0.8.9
 colorama==0.3.9
 confluent-kafka==0.11.5
 constantly==15.1.0
 contextlib2==0.5.5
-cryptography==2.2.2
-debtcollector==1.19.0
-decorator==4.2.1
-deprecation==2.0
+cryptography==2.3.1
+debtcollector==1.20.0
+decorator==4.3.0
+deprecation==2.0.6
+Django==1.11.11
 django-extensions==2.0.6
 django-timezones==0.2
 djangorestframework==3.7.7
 dnspython==1.15.0
 docopt==0.6.2
-dogpile.cache==0.6.5
-enum-compat==0.0.2
+dogpile.cache==0.6.7
 enum34==1.1.6
-eventlet==0.20.0
+eventlet==0.24.1
 fasteners==0.14.1
 funcsigs==1.0.2
-functools32==3.2.3-2
+functools32==3.2.3.post2
 futures==3.2.0
-futurist==1.6.0
+futurist==1.7.0
 google-api-python-client==1.6.5
-greenlet==0.4.13
-grpcio-tools==1.12.0
+greenlet==0.4.15
 grpcio==1.12.0
-httplib2==0.11.1
+grpcio-tools==1.12.0
+httplib2==0.11.3
 idna==2.6
 incremental==17.5.0
-ipaddress==1.0.19
+inflect==1.0.1
+ipaddress==1.0.22
 iso8601==0.1.12
+Jinja2==2.10
 jmespath==0.9.3
-jsonpatch==1.21
+jsonpatch==1.23
 jsonpointer==2.0
 jsonschema==2.6.0
 kafka==1.3.5
 keystoneauth1==3.4.0
-kombu==4.1.0
+kombu==4.2.1
+MarkupSafe==1.0
 mock==2.0.0
-monotonic==1.4
+monotonic==1.5
 msgpack==0.5.6
 multistructlog==1.5
-munch==2.2.0
+munch==2.3.2
 netaddr==0.7.19
-netifaces==0.10.6
+netifaces==0.10.7
 networkx==1.11
 nose==1.3.7
-oauth2client==4.1.2
-openstacksdk==0.12.0
-os-client-config==1.29.0
-os-service-types==1.2.0
-osc-lib==1.10.0
-oslo.concurrency==3.26.0
-oslo.config==6.0.0
-oslo.context==2.20.0
-oslo.i18n==3.20.0
+oauth2client==4.1.3
+openstacksdk==0.17.2
+os-client-config==1.31.2
+os-service-types==1.3.0
+osc-lib==1.11.1
+oslo.concurrency==3.28.1
+oslo.config==6.5.1
+oslo.context==2.21.0
+oslo.i18n==3.22.1
 oslo.log==3.37.0
 oslo.messaging==5.36.0
-oslo.middleware==3.35.0
+oslo.middleware==3.36.0
 oslo.serialization==2.25.0
-oslo.service==1.30.0
+oslo.service==1.32.0
 oslo.utils==3.36.0
-packaging==17.1
-paramiko==2.4.1
-pbr==4.0.0
+packaging==18.0
+paramiko==2.4.2
+Paste==2.0.3
+PasteDeploy==1.5.2
+pbr==4.2.0
+pika==0.12.0
 pika-pool==0.1.3
-pika==0.10.0
-pipdeptree==0.11.0
+pipdeptree==0.13.0
 ply==3.11
 plyxproto==3.1.0
-positional==1.2.1
 prettytable==0.7.2
 protobuf==3.5.2
 # Avoids a warning, see http://initd.org/psycopg/docs/faq.html#faq-compile
 psycopg2==2.7.4 --no-binary psycopg2
-pyOpenSSL==17.5.0
-pyasn1-modules==0.2.1
-pyasn1==0.4.2
-pycparser==2.18
+pyasn1==0.4.4
+pyasn1-modules==0.2.2
+pycparser==2.19
 pyinotify==0.9.6
 pykwalify==1.6.1
-pyparsing==2.2.0
-pyperclip==1.6.0
-python-cinderclient==3.5.0
+PyNaCl==1.3.0
+pyOpenSSL==17.5.0
+pyparsing==2.2.2
+pyperclip==1.7.0
+python-cinderclient==4.0.1
 python-consul==0.7.2
-python-dateutil==2.7.2
+python-dateutil==2.7.3
 python-glanceclient==2.9.1
 python-keystoneclient==3.15.0
 python-logstash==0.4.6
@@ -117,26 +110,32 @@
 python-novaclient==10.1.0
 python-openstackclient==3.14.0
 pytz==2018.3
+PyYAML==3.12
 repoze.lru==0.7
 requests==2.18.4
 requestsexceptions==1.4.0
 rfc3986==1.1.0
-rsa==3.4.2
+Routes==2.4.1
+rsa==4.0
 service-identity==17.0.0
 shade==1.27.1
-simplejson==3.13.2
+simplejson==3.16.0
 six==1.11.0
-statsd==3.2.2
-stevedore==1.28.0
+statsd==3.3.0
+stevedore==1.29.0
 structlog==18.1.0
-subprocess32==3.2.7
-tenacity==4.9.0
+subprocess32==3.5.2
+tenacity==5.0.2
 tosca-parser==0.9.0
-typing==3.6.4
+Twisted==16.6.0
+typing==3.6.6
 unicodecsv==0.14.1
 uritemplate==3.0.0
 urllib3==1.22
 vine==1.1.4
 warlock==1.3.0
+wcwidth==0.1.7
+WebOb==1.8.2
+Werkzeug==0.14.1
 wrapt==1.10.11
-zope.interface==4.4.3
+zope.interface==4.5.0
diff --git a/lib/xos-genx/setup.py b/lib/xos-genx/setup.py
index 109af47..c97ba52 100644
--- a/lib/xos-genx/setup.py
+++ b/lib/xos-genx/setup.py
@@ -35,7 +35,7 @@
       include_package_data=True,
       # TODO add all deps to the install_requires section
       install_requires=[
-          'pattern>=2.6',
+          'inflect>=1.0.1',
           'astunparse>=1.5.0'
           ]
      )
diff --git a/lib/xos-genx/xosgenx/jinja2_extensions/base.py b/lib/xos-genx/xosgenx/jinja2_extensions/base.py
index 561aeea..702b554 100644
--- a/lib/xos-genx/xosgenx/jinja2_extensions/base.py
+++ b/lib/xos-genx/xosgenx/jinja2_extensions/base.py
@@ -16,7 +16,9 @@
 
 import pdb
 import re
-from pattern import en
+from inflect import engine as inflect_engine_class
+
+inflect_engine = inflect_engine_class()
 
 class FieldNotFound(Exception):
     def __init__(self, message):
@@ -41,7 +43,7 @@
         singular = field['options']['singular']
         singular = unquote(singular)
     except KeyError:
-        singular = en.singularize(field['name'])
+        singular = inflect_engine.singular_noun(field['name'])
 
     return singular
 
@@ -51,7 +53,7 @@
         plural = field['options']['plural']
         plural = unquote(plural)
     except KeyError:
-        plural = en.pluralize(en.singularize(field['name']))
+        plural = inflect_engine.plural_noun(inflect_engine.singular_noun(field['name']))
 
     return plural
 
@@ -61,7 +63,7 @@
         plural = field['options']['plural']
         plural = unquote(plural)
     except KeyError:
-        plural = en.pluralize(field['name'])
+        plural = inflect_engine.plural_noun(field['name'])
 
     return plural
 
diff --git a/scripts/xos_dev_reqs.txt b/scripts/xos_dev_reqs.txt
index b306f5a..983e1c3 100644
--- a/scripts/xos_dev_reqs.txt
+++ b/scripts/xos_dev_reqs.txt
@@ -1,5 +1,5 @@
 Jinja2==2.10
-Pattern==2.6
+inflect==1.0.1
 PyYAML==3.12
 Twisted==16.6.0
 astunparse==1.5.0