text_prompt stringlengths 157 13.1k | code_prompt stringlengths 7 19.8k ⌀ |
|---|---|
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_ipsec_site_connection(self, ipsecsite_conn, **_params):
"""Fetches information of a specific IPsecSiteConnection.""" |
return self.get(
self.ipsec_site_connection_path % (ipsecsite_conn), params=_params
) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_ipsec_site_connection(self, ipsecsite_conn, body=None):
"""Updates an IPsecSiteConnection.""" |
return self.put(
self.ipsec_site_connection_path % (ipsecsite_conn), body=body
) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_ikepolicies(self, retrieve_all=True, **_params):
"""Fetches a list of all configured IKEPolicies for a project.""" |
return self.list('ikepolicies', self.ikepolicies_path, retrieve_all,
**_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_ikepolicy(self, ikepolicy, **_params):
"""Fetches information of a specific IKEPolicy.""" |
return self.get(self.ikepolicy_path % (ikepolicy), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_ikepolicy(self, ikepolicy, body=None):
"""Updates an IKEPolicy.""" |
return self.put(self.ikepolicy_path % (ikepolicy), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_ipsecpolicies(self, retrieve_all=True, **_params):
"""Fetches a list of all configured IPsecPolicies for a project.""" |
return self.list('ipsecpolicies',
self.ipsecpolicies_path,
retrieve_all,
**_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_ipsecpolicy(self, ipsecpolicy, **_params):
"""Fetches information of a specific IPsecPolicy.""" |
return self.get(self.ipsecpolicy_path % (ipsecpolicy), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_ipsecpolicy(self, ipsecpolicy, body=None):
"""Updates an IPsecPolicy.""" |
return self.put(self.ipsecpolicy_path % (ipsecpolicy), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_loadbalancers(self, retrieve_all=True, **_params):
"""Fetches a list of all loadbalancers for a project.""" |
return self.list('loadbalancers', self.lbaas_loadbalancers_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_loadbalancer(self, lbaas_loadbalancer, **_params):
"""Fetches information for a load balancer.""" |
return self.get(self.lbaas_loadbalancer_path % (lbaas_loadbalancer),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_loadbalancer(self, lbaas_loadbalancer, body=None):
"""Updates a load balancer.""" |
return self.put(self.lbaas_loadbalancer_path % (lbaas_loadbalancer),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def retrieve_loadbalancer_stats(self, loadbalancer, **_params):
"""Retrieves stats for a certain load balancer.""" |
return self.get(self.lbaas_loadbalancer_path_stats % (loadbalancer),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def retrieve_loadbalancer_status(self, loadbalancer, **_params):
"""Retrieves status for a certain load balancer.""" |
return self.get(self.lbaas_loadbalancer_path_status % (loadbalancer),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_listeners(self, retrieve_all=True, **_params):
"""Fetches a list of all lbaas_listeners for a project.""" |
return self.list('listeners', self.lbaas_listeners_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_listener(self, lbaas_listener, **_params):
"""Fetches information for a lbaas_listener.""" |
return self.get(self.lbaas_listener_path % (lbaas_listener),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_listener(self, lbaas_listener, body=None):
"""Updates a lbaas_listener.""" |
return self.put(self.lbaas_listener_path % (lbaas_listener),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_lbaas_l7policies(self, retrieve_all=True, **_params):
"""Fetches a list of all L7 policies for a listener.""" |
return self.list('l7policies', self.lbaas_l7policies_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_lbaas_l7policy(self, l7policy, **_params):
"""Fetches information of a certain listener's L7 policy.""" |
return self.get(self.lbaas_l7policy_path % l7policy,
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_lbaas_l7policy(self, l7policy, body=None):
"""Updates L7 policy.""" |
return self.put(self.lbaas_l7policy_path % l7policy,
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_lbaas_l7rules(self, l7policy, retrieve_all=True, **_params):
"""Fetches a list of all rules for L7 policy.""" |
return self.list('rules', self.lbaas_l7rules_path % l7policy,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_lbaas_l7rule(self, l7rule, l7policy, **_params):
"""Fetches information of a certain L7 policy's rule.""" |
return self.get(self.lbaas_l7rule_path % (l7policy, l7rule),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def create_lbaas_l7rule(self, l7policy, body=None):
"""Creates rule for a certain L7 policy.""" |
return self.post(self.lbaas_l7rules_path % l7policy, body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_lbaas_l7rule(self, l7rule, l7policy, body=None):
"""Updates L7 rule.""" |
return self.put(self.lbaas_l7rule_path % (l7policy, l7rule),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def delete_lbaas_l7rule(self, l7rule, l7policy):
"""Deletes the specified L7 rule.""" |
return self.delete(self.lbaas_l7rule_path % (l7policy, l7rule)) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_lbaas_pools(self, retrieve_all=True, **_params):
"""Fetches a list of all lbaas_pools for a project.""" |
return self.list('pools', self.lbaas_pools_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_lbaas_pool(self, lbaas_pool, **_params):
"""Fetches information for a lbaas_pool.""" |
return self.get(self.lbaas_pool_path % (lbaas_pool),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_lbaas_pool(self, lbaas_pool, body=None):
"""Updates a lbaas_pool.""" |
return self.put(self.lbaas_pool_path % (lbaas_pool),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_lbaas_healthmonitors(self, retrieve_all=True, **_params):
"""Fetches a list of all lbaas_healthmonitors for a project.""" |
return self.list('healthmonitors', self.lbaas_healthmonitors_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_lbaas_healthmonitor(self, lbaas_healthmonitor, **_params):
"""Fetches information for a lbaas_healthmonitor.""" |
return self.get(self.lbaas_healthmonitor_path % (lbaas_healthmonitor),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_lbaas_healthmonitor(self, lbaas_healthmonitor, body=None):
"""Updates a lbaas_healthmonitor.""" |
return self.put(self.lbaas_healthmonitor_path % (lbaas_healthmonitor),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_lbaas_loadbalancers(self, retrieve_all=True, **_params):
"""Fetches a list of all lbaas_loadbalancers for a project.""" |
return self.list('loadbalancers', self.lbaas_loadbalancers_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_lbaas_members(self, lbaas_pool, retrieve_all=True, **_params):
"""Fetches a list of all lbaas_members for a project.""" |
return self.list('members', self.lbaas_members_path % lbaas_pool,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_lbaas_member(self, lbaas_member, lbaas_pool, **_params):
"""Fetches information of a certain lbaas_member.""" |
return self.get(self.lbaas_member_path % (lbaas_pool, lbaas_member),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def create_lbaas_member(self, lbaas_pool, body=None):
"""Creates a lbaas_member.""" |
return self.post(self.lbaas_members_path % lbaas_pool, body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_lbaas_member(self, lbaas_member, lbaas_pool, body=None):
"""Updates a lbaas_member.""" |
return self.put(self.lbaas_member_path % (lbaas_pool, lbaas_member),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def delete_lbaas_member(self, lbaas_member, lbaas_pool):
"""Deletes the specified lbaas_member.""" |
return self.delete(self.lbaas_member_path % (lbaas_pool, lbaas_member)) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_vips(self, retrieve_all=True, **_params):
"""Fetches a list of all load balancer vips for a project.""" |
# Pass filters in "params" argument to do_request
return self.list('vips', self.vips_path, retrieve_all,
**_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_vip(self, vip, **_params):
"""Fetches information of a certain load balancer vip.""" |
return self.get(self.vip_path % (vip), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_vip(self, vip, body=None):
"""Updates a load balancer vip.""" |
return self.put(self.vip_path % (vip), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_pools(self, retrieve_all=True, **_params):
"""Fetches a list of all load balancer pools for a project.""" |
# Pass filters in "params" argument to do_request
return self.list('pools', self.pools_path, retrieve_all,
**_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_pool(self, pool, **_params):
"""Fetches information of a certain load balancer pool.""" |
return self.get(self.pool_path % (pool), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_pool(self, pool, body=None):
"""Updates a load balancer pool.""" |
return self.put(self.pool_path % (pool), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def retrieve_pool_stats(self, pool, **_params):
"""Retrieves stats for a certain load balancer pool.""" |
return self.get(self.pool_path_stats % (pool), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_members(self, retrieve_all=True, **_params):
"""Fetches a list of all load balancer members for a project.""" |
# Pass filters in "params" argument to do_request
return self.list('members', self.members_path, retrieve_all,
**_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_member(self, member, **_params):
"""Fetches information of a certain load balancer member.""" |
return self.get(self.member_path % (member), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_member(self, member, body=None):
"""Updates a load balancer member.""" |
return self.put(self.member_path % (member), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_health_monitors(self, retrieve_all=True, **_params):
"""Fetches a list of all load balancer health monitors for a project. """ |
# Pass filters in "params" argument to do_request
return self.list('health_monitors', self.health_monitors_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_health_monitor(self, health_monitor, **_params):
"""Fetches information of a certain load balancer health monitor.""" |
return self.get(self.health_monitor_path % (health_monitor),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_health_monitor(self, health_monitor, body=None):
"""Updates a load balancer health monitor.""" |
return self.put(self.health_monitor_path % (health_monitor), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def associate_health_monitor(self, pool, body):
"""Associate specified load balancer health monitor and pool.""" |
return self.post(self.associate_pool_health_monitors_path % (pool),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def disassociate_health_monitor(self, pool, health_monitor):
"""Disassociate specified load balancer health monitor and pool.""" |
path = (self.disassociate_pool_health_monitors_path %
{'pool': pool, 'health_monitor': health_monitor})
return self.delete(path) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_qos_queue(self, queue, **_params):
"""Fetches information of a certain queue.""" |
return self.get(self.qos_queue_path % (queue),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_agent(self, agent, **_params):
"""Fetches information of a certain agent.""" |
return self.get(self.agent_path % (agent), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_agent(self, agent, body=None):
"""Updates an agent.""" |
return self.put(self.agent_path % (agent), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_network_gateway(self, gateway_id, **_params):
"""Fetch a network gateway.""" |
return self.get(self.network_gateway_path % gateway_id, params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_network_gateway(self, gateway_id, body=None):
"""Update a network gateway.""" |
return self.put(self.network_gateway_path % gateway_id, body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def connect_network_gateway(self, gateway_id, body=None):
"""Connect a network gateway to the specified network.""" |
base_uri = self.network_gateway_path % gateway_id
return self.put("%s/connect_network" % base_uri, body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def disconnect_network_gateway(self, gateway_id, body=None):
"""Disconnect a network from the specified gateway.""" |
base_uri = self.network_gateway_path % gateway_id
return self.put("%s/disconnect_network" % base_uri, body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_gateway_device(self, gateway_device_id, **_params):
"""Fetch a gateway device.""" |
return self.get(self.gateway_device_path % gateway_device_id,
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_gateway_device(self, gateway_device_id, body=None):
"""Updates a new gateway device.""" |
return self.put(self.gateway_device_path % gateway_device_id,
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def add_network_to_dhcp_agent(self, dhcp_agent, body=None):
"""Adds a network to dhcp agent.""" |
return self.post((self.agent_path + self.DHCP_NETS) % dhcp_agent,
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def remove_network_from_dhcp_agent(self, dhcp_agent, network_id):
"""Remove a network from dhcp agent.""" |
return self.delete((self.agent_path + self.DHCP_NETS + "/%s") % (
dhcp_agent, network_id)) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def add_router_to_l3_agent(self, l3_agent, body):
"""Adds a router to L3 agent.""" |
return self.post((self.agent_path + self.L3_ROUTERS) % l3_agent,
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_dragents_hosting_bgp_speaker(self, bgp_speaker, **_params):
"""Fetches a list of Dynamic Routing agents hosting a BGP speaker.""" |
return self.get((self.bgp_speaker_path + self.BGP_DRAGENTS)
% bgp_speaker, params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def add_bgp_speaker_to_dragent(self, bgp_dragent, body):
"""Adds a BGP speaker to Dynamic Routing agent.""" |
return self.post((self.agent_path + self.BGP_DRINSTANCES)
% bgp_dragent, body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def remove_bgp_speaker_from_dragent(self, bgp_dragent, bgpspeaker_id):
"""Removes a BGP speaker from Dynamic Routing agent.""" |
return self.delete((self.agent_path + self.BGP_DRINSTANCES + "/%s")
% (bgp_dragent, bgpspeaker_id)) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_bgp_speaker_on_dragent(self, bgp_dragent, **_params):
"""Fetches a list of BGP speakers hosted by Dynamic Routing agent.""" |
return self.get((self.agent_path + self.BGP_DRINSTANCES)
% bgp_dragent, params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_firewall_rules(self, retrieve_all=True, **_params):
"""Fetches a list of all firewall rules for a project.""" |
# Pass filters in "params" argument to do_request
return self.list('firewall_rules', self.firewall_rules_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_firewall_rule(self, firewall_rule, **_params):
"""Fetches information of a certain firewall rule.""" |
return self.get(self.firewall_rule_path % (firewall_rule),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_firewall_rule(self, firewall_rule, body=None):
"""Updates a firewall rule.""" |
return self.put(self.firewall_rule_path % (firewall_rule), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_firewall_policies(self, retrieve_all=True, **_params):
"""Fetches a list of all firewall policies for a project.""" |
# Pass filters in "params" argument to do_request
return self.list('firewall_policies', self.firewall_policies_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_firewall_policy(self, firewall_policy, **_params):
"""Fetches information of a certain firewall policy.""" |
return self.get(self.firewall_policy_path % (firewall_policy),
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_firewall_policy(self, firewall_policy, body=None):
"""Updates a firewall policy.""" |
return self.put(self.firewall_policy_path % (firewall_policy),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def firewall_policy_insert_rule(self, firewall_policy, body=None):
"""Inserts specified rule into firewall policy.""" |
return self.put(self.firewall_policy_insert_path % (firewall_policy),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def firewall_policy_remove_rule(self, firewall_policy, body=None):
"""Removes specified rule from firewall policy.""" |
return self.put(self.firewall_policy_remove_path % (firewall_policy),
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_firewalls(self, retrieve_all=True, **_params):
"""Fetches a list of all firewalls for a project.""" |
# Pass filters in "params" argument to do_request
return self.list('firewalls', self.firewalls_path, retrieve_all,
**_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_firewall(self, firewall, **_params):
"""Fetches information of a certain firewall.""" |
return self.get(self.firewall_path % (firewall), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_firewall(self, firewall, body=None):
"""Updates a firewall.""" |
return self.put(self.firewall_path % (firewall), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def remove_router_from_l3_agent(self, l3_agent, router_id):
"""Remove a router from l3 agent.""" |
return self.delete((self.agent_path + self.L3_ROUTERS + "/%s") % (
l3_agent, router_id)) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def get_lbaas_agent_hosting_pool(self, pool, **_params):
"""Fetches a loadbalancer agent hosting a pool.""" |
return self.get((self.pool_path + self.LOADBALANCER_AGENT) % pool,
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_pools_on_lbaas_agent(self, lbaas_agent, **_params):
"""Fetches a list of pools hosted by the loadbalancer agent.""" |
return self.get((self.agent_path + self.LOADBALANCER_POOLS) %
lbaas_agent, params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def get_lbaas_agent_hosting_loadbalancer(self, loadbalancer, **_params):
"""Fetches a loadbalancer agent hosting a loadbalancer.""" |
return self.get((self.lbaas_loadbalancer_path +
self.LOADBALANCER_HOSTING_AGENT) % loadbalancer,
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_loadbalancers_on_lbaas_agent(self, lbaas_agent, **_params):
"""Fetches a list of loadbalancers hosted by the loadbalancer agent.""" |
return self.get((self.agent_path + self.AGENT_LOADBALANCERS) %
lbaas_agent, params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_service_providers(self, retrieve_all=True, **_params):
"""Fetches service providers.""" |
# Pass filters in "params" argument to do_request
return self.list('service_providers', self.service_providers_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_metering_labels(self, retrieve_all=True, **_params):
"""Fetches a list of all metering labels for a project.""" |
return self.list('metering_labels', self.metering_labels_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_metering_label(self, metering_label, **_params):
"""Fetches information of a certain metering label.""" |
return self.get(self.metering_label_path %
(metering_label), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_metering_label_rules(self, retrieve_all=True, **_params):
"""Fetches a list of all metering label rules for a label.""" |
return self.list('metering_label_rules',
self.metering_label_rules_path, retrieve_all,
**_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_metering_label_rule(self, metering_label_rule, **_params):
"""Fetches information of a certain metering label rule.""" |
return self.get(self.metering_label_rule_path %
(metering_label_rule), params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_rbac_policy(self, rbac_policy_id, body=None):
"""Update a RBAC policy.""" |
return self.put(self.rbac_policy_path % rbac_policy_id, body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_rbac_policies(self, retrieve_all=True, **_params):
"""Fetch a list of all RBAC policies for a project.""" |
return self.list('rbac_policies', self.rbac_policies_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_rbac_policy(self, rbac_policy_id, **_params):
"""Fetch information of a certain RBAC policy.""" |
return self.get(self.rbac_policy_path % rbac_policy_id,
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_qos_policies(self, retrieve_all=True, **_params):
"""Fetches a list of all qos policies for a project.""" |
# Pass filters in "params" argument to do_request
return self.list('policies', self.qos_policies_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_qos_policy(self, qos_policy, **_params):
"""Fetches information of a certain qos policy.""" |
return self.get(self.qos_policy_path % qos_policy,
params=_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_qos_policy(self, qos_policy, body=None):
"""Updates a qos policy.""" |
return self.put(self.qos_policy_path % qos_policy,
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_qos_rule_types(self, retrieve_all=True, **_params):
"""List available qos rule types.""" |
return self.list('rule_types', self.qos_rule_types_path,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def list_bandwidth_limit_rules(self, policy_id, retrieve_all=True, **_params):
"""Fetches a list of all bandwidth limit rules for the given policy.""" |
return self.list('bandwidth_limit_rules',
self.qos_bandwidth_limit_rules_path % policy_id,
retrieve_all, **_params) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def show_bandwidth_limit_rule(self, rule, policy, body=None):
"""Fetches information of a certain bandwidth limit rule.""" |
return self.get(self.qos_bandwidth_limit_rule_path %
(policy, rule), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def create_bandwidth_limit_rule(self, policy, body=None):
"""Creates a new bandwidth limit rule.""" |
return self.post(self.qos_bandwidth_limit_rules_path % policy,
body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def update_bandwidth_limit_rule(self, rule, policy, body=None):
"""Updates a bandwidth limit rule.""" |
return self.put(self.qos_bandwidth_limit_rule_path %
(policy, rule), body=body) |
<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
def delete_bandwidth_limit_rule(self, rule, policy):
"""Deletes a bandwidth limit rule.""" |
return self.delete(self.qos_bandwidth_limit_rule_path %
(policy, rule)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.