Mitch Garnaat

Cleaning up a few small things.

1 -The Config File
2 -===============
3 -
4 -The config file is at the heart of kappa. It is what describes your functions
5 -and drives your deployments. This section provides a reference for all of the
6 -elements of the kappa config file.
7 -
8 -Example
9 --------
10 -
11 -Here is a simple example config file from the sample/simple directory::
12 -
13 - ---
14 - name: foobar
15 - environments:
16 - dev:
17 - profile: fiebaz-dev
18 - region: us-west-2
19 - policy:
20 - arn: arn:aws:iam::aws:policy/service-role/AWSLambdaRole
21 - prod:
22 - profile: fiebaz-prod
23 - region: us-west-2
24 - policy:
25 - arn: arn:aws:iam::aws:policy/service-role/AWSLambdaRole
26 - lambda:
27 - description: A simple Python Lambda example
28 - path: code/
29 - handler: foobar.handler
30 - runtime: python2.7
31 - memory_size: 256
32 - timeout: 3
33 - test_data: input.json
34 -
35 -This config file is defining
36 -
...@@ -189,7 +189,7 @@ class RestApi(object): ...@@ -189,7 +189,7 @@ class RestApi(object):
189 def create_methods(self): 189 def create_methods(self):
190 resource_config = self._config['resource'] 190 resource_config = self._config['resource']
191 for method in resource_config.get('methods', dict()): 191 for method in resource_config.get('methods', dict()):
192 - if not self.method_exists(): 192 + if not self.method_exists(method):
193 method_config = resource_config['methods'][method] 193 method_config = resource_config['methods'][method]
194 self.create_method(method, method_config) 194 self.create_method(method, method_config)
195 195
...@@ -253,7 +253,7 @@ class RestApi(object): ...@@ -253,7 +253,7 @@ class RestApi(object):
253 resourceId=self.resource_id) 253 resourceId=self.resource_id)
254 LOG.debug(response) 254 LOG.debug(response)
255 except ClientError: 255 except ClientError:
256 - LOG.exception('Unable to delete resource ', self.resource_name) 256 + LOG.exception('Unable to delete resource %s', self.resource_name)
257 return response 257 return response
258 258
259 def status(self): 259 def status(self):
......
...@@ -42,10 +42,10 @@ def _post(event, context): ...@@ -42,10 +42,10 @@ def _post(event, context):
42 42
43 def _put(event, context): 43 def _put(event, context):
44 data = _get(event, context) 44 data = _get(event, context)
45 - id = data.get('id') 45 + id_ = data.get('id')
46 data.update(event['json_body']) 46 data.update(event['json_body'])
47 # don't allow the id to be changed 47 # don't allow the id to be changed
48 - data['id'] = id 48 + data['id'] = id_
49 table.put_item(Item=data) 49 table.put_item(Item=data)
50 return data 50 return data
51 51
......