Completed
Pull Request — master (#415)
by Anthony
02:06
created

ConfigureAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %
Metric Value
dl 0
loc 8
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 6 2
1
from lib.actions import BaseAction
2
import yaml
3
4
__all__ = [
5
    'ConfigureAction'
6
]
7
8
9
class ConfigureAction(BaseAction):
10
11
    def run(self, api_user, api_password):
12
        with open('/opt/stackstorm/packs/dimensiondata/config.yaml',
13
                  'w') as outfile:
14
            outfile.write(yaml.safe_dump(
15
                {"api_user": api_user,
16
                 "api_password": api_password}))
17