Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

TelekomCloud/puppet-post2sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

puppet-post2sms

Simple puppet module to set up a proxy to receive POST requests and send SOAP calls to trigger an SMS.

It works by issuing an:

http post proxyserver/?number=0049151...&name=luke "the force is throwing alarms"

which contain the name und number in its url parameters and the message for the sms in its body. This in turn will proxy a SOAP call to the destination to trigger an SMS.

Testing the module

If you can't control the SOAP-Endpoint and receive an SMS, you can still verify it is working correctly by looking at the SOAP request that is generated.

The following steps will describe this configuration. You can also use the contained Vagrant environment which is already configured for this case.

Install it via puppet:

class { 'post2sms':
  gw_host => 'http://localhost:8081'
}

Open a listener to capture the request (for Vagrant: do this inside the VM):

nc -l 8081

Issue a POST request to the proxy (for Vagrant: on the host):

curl 'localhost:8080/?name=luke&number=0012321' -d "the force is throwing alarms"

Look at your listener, it will have captured the request.

.Vagrant

In order to bring up the vagrant test environment, you will need librarian-puppet installed on your system.

Then you can simply:

cd vagrant/
librarian-puppet install
vagrant up

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published