@@ -0,0 +1,1219 @@
+from cloudify import ctx%0Afrom cloudify.decorators import operation%0Afrom cloudify.exceptions import NonRecoverableError, RecoverableError%0Aimport connection%0A%0A%0A%0A@operation%0Adef create(**_):%0A    params = ctx.node.properties%5B'parameters'%5D%0A    cloud = connection.MistConnectionClient().cloud%0A    del params%5B%22cloud_id%22%5D%0A    try:%0A        network = cloud.create_network(**params)%0A%0A        ctx.instance.runtime_properties%5B%22info%22%5D = network%0A    except Exception as exc:%0A        raise Exception(exc)%0A    # connection.MistConnectionClient().machine.destroy()%0A    # ctx.logger.info('Machine destroyed')%0A%0A%0A%0A@operation%0Adef delete(**_):%0A%0A    try:%0A        network_id = ctx.instance.runtime_properties%5B%22info%22%5D%5B%22id%22%5D%0A        connection.MistConnectionClient().cloud.delete_network(network_id)%0A    except Exception as exc:%0A        raise Exception(exc)%0A    # connection.MistConnectionClient().machine.destroy()%0A    # ctx.logger.info('Machine destroyed')%0A%0A@operation%0Adef associate_network(**kwargs):%0A    print %22associatekk%22%0A    import ipdb%0A    ipdb.set_trace()%0A    ip = kwargs.get(%22ip%22)%0A    assign = kwargs.get(%22assign%22)%0A    machine_id = ctx.target.instance.runtime_properties%5B%22machine_id%22%5D%0A    cloud_id = ctx.target.node.properties%5B%22cloud_id%22%5D

add network create delete and associate methods