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

ConfigureAction   A

Complexity

Total Complexity 2

Size/Duplication

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 5 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', 'w') as outfile:
13
            outfile.write(yaml.safe_dump(
14
                {"api_user": api_user,
15
                 "api_password": api_password}))
16