code: def create_stack(self, name):
          
          deployment = find_exact(self.api.deployments, name=name)
          if not deployment:
              try:
                  # TODO: replace when python-rightscale handles non-json
                  self.api.client.post(
                          '/api/deployments',
                          data={'deployment[name]': name},
                          )
              except HTTPError as e:
                  log.error(
                          'Failed to create stack %s. '
                          'RightScale returned %d:\n%s'
                          % (name, e.response.status_code, e.response.content)
                          )
docs: Creates stack if necessary.