'Adds a deployment to the inventory and index'

def add_deployment(self, cloud_service, deployment):

    for role in deployment.role_instance_list.role_instances:
        try:
            port = '22'
            for ie in role.instance_endpoints.instance_endpoints:
                if (ie.name == 'SSH'):
                    port = ie.public_port
                    break
        except AttributeError as e:
            pass
        finally:
            self.add_instance(role.instance_name, deployment, port, cloud_service, role.instance_status)
