From 12e680c56aa82ce318bbad9bc0f7d4e1b0942719 Mon Sep 17 00:00:00 2001
From: Matteo <matteo@pop-os.localdomain>
Date: Mon, 30 Sep 2019 14:14:59 +0200
Subject: [PATCH] Add open_port to config_php

---
 create-and-deploy-charms.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/create-and-deploy-charms.rst b/create-and-deploy-charms.rst
index 20f8ab6..5417b8f 100644
--- a/create-and-deploy-charms.rst
+++ b/create-and-deploy-charms.rst
@@ -286,7 +286,7 @@ Configure the Wordpress application according to https://help.ubuntu.com/lts/ser
 
     .. code-block:: python
 
-        @when_all('wordpress.installed', 'wordpress.database_is_ready')
+        @when_all('wordpress.ready', 'wordpress.database_is_ready')
         def config_php():
             status_set('maintenance', 'configuring wordpress')
             mysql = relation_get()
@@ -297,6 +297,7 @@ Configure the Wordpress application according to https://help.ubuntu.com/lts/ser
                     context={
                         'my_database': mysql
                     })
+	    open_port(80, protocol='TCP')
             status_set('active', 'Ready')
 
 
@@ -310,7 +311,7 @@ Configure the Wordpress application according to https://help.ubuntu.com/lts/ser
     .. code-block:: python
 
         from charms.reactive import when, when_not, set_flag, hook, when_all
-        from charmhelpers.core.hookenv import status_set, relation_get, log
+        from charmhelpers.core.hookenv import status_set, relation_get, log, open_port
         from charmhelpers.core.host import write_file, service_restart
         from charmhelpers.core.templating import render
         import charms.apt
-- 
GitLab