Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Public Member Functions | |
def | __cmp__ (self, other) |
def | __eq__ (self, other) |
def | __ge__ (self, other) |
def | __getitem__ (self, key) |
def | __gt__ (self, other) |
def | __init__ (self, defaults=None, templates=None) |
def | __le__ (self, other) |
def | __lt__ (self, other) |
def | add_defaults (self, defaults) |
def | add_templates (self, templates) |
def | get (self, key, from_self=True, from_templates=True, from_defaults=True) |
def | get_merged (self, key) |
def | keys (self, self_only=False) |
Public Member Functions inherited from MultiOrderedDict | |
def | __init__ (self, *args, **kwds) |
def | __setitem__ (self, key, val, i=None) |
def | copy (self) |
def | insert (self, i, key, val) |
Public Member Functions inherited from OrderedDict | |
def | __delitem__ (self, key, dict_delitem=dict.__delitem__) |
def | __eq__ (self, other) |
def | __init__ (self, *args, **kwds) |
def | __iter__ (self) |
def | __ne__ (self, other) |
def | __reduce__ (self) |
def | __repr__ (self, _repr_running={}) |
def | __reversed__ (self) |
def | __setitem__ (self, key, value, dict_setitem=dict.__setitem__) |
def | clear (self) |
def | copy (self) |
def | fromkeys (cls, iterable, value=None) |
def | items (self) |
def | iteritems (self) |
def | iterkeys (self) |
def | itervalues (self) |
def | keys (self) |
def | pop (self, key, default=__marker) |
def | popitem (self, last=True) |
def | setdefault (self, key, default=None) |
def | update (*args, **kwds) |
def | values (self) |
def | viewitems (self) |
def | viewkeys (self) |
def | viewvalues (self) |
Data Fields | |
id | |
Static Public Attributes | |
int | count = 0 |
A Section is a MultiOrderedDict itself that maintains a list of key/value options. However, in the case of an Asterisk config file a section may have other defaults sections that is can pull data from (i.e. templates). So when an option is looked up by key it first checks the base section and if not found looks in the added default sections. If not found at that point then a 'KeyError' exception is raised.
Definition at line 29 of file astconfigparser.py.
def __init__ | ( | self, | |
args = None , |
|||
kwds = None |
|||
) |
Initialize an ordered dictionary. Signature is the same as for regular dictionaries, but keyword arguments are not recommended because their insertion order is arbitrary.
Reimplemented from MultiOrderedDict.
Definition at line 41 of file astconfigparser.py.
def __cmp__ | ( | self, | |
other | |||
) |
Use self.id as means of determining equality
Definition at line 49 of file astconfigparser.py.
References adsi_flag.id, unistim_device.id, mbl_pvt.id, adsi_display.id, id, srv_result_datastore.id, adapter_pvt.id, adsi_event.id, adsi_soft_key.id, adsi_subscript.id, adsi_state.id, adsi_key_cmd.id, local_optimization.id, conf_menu_action.id, native_rtp_framehook_data.id, audiosocket_instance.id, Section.id, enum_result_datastore.id, ast_aoc_charging_association.id, ast_cc_monitor.id, ast_party_caller.id, ast_set_party_caller.id, ast_party_connected_line.id, ast_set_party_connected_line.id, ast_codec.id, ast_aeap_message_type.id, ast_fax_session_details.id, ast_fax_session.id, ast_geoloc_eprofile.id, ast_sip_transport_state.id, ast_sip_endpoint.id, ast_sip_session.id, ast_sip_session_sdp_handler.id, ast_rtp_engine_ice_candidate.id, ast_channel_snapshot_bridge.id, ast_endpoint_snapshot.id, ast_xmpp_message.id, ast_xmpp_buddy.id, aoc_ie_billing.id, sync_payload.id, bridge_sync.id, cel_linkedid.id, dns_HEADER.id, ast_endpoint.id, ast_framehook.id, io_rec.id, category_t.id, ast_state_cb.id, sched_id.id, ast_sorcery_object.id, cache_entry_key.id, stasis_message_type.id, stasis_state_proxy.id, stasis_state.id, stun_header.id, worker_thread.id, dundi_result_datastore.id, ast_ari_asterisk_get_object_args.id, ast_ari_asterisk_update_object_args.id, ast_ari_asterisk_delete_object_args.id, aeap_user_data.id, aeap_transaction.id, calendar_id.id, corosync_node.id, eprofiles_datastore.id, internal_state.id, exten_state_subscription.id, ast_sip_outbound_publish_state.id, mwi_subscription.id, stun_trans_id.id, hep_ctrl.id, unbound_resolver_data.id, smdi_msg_datastore.id, stasis_app_playback.id, app_forwards.id, Model.id, mock_payload.id, test_obj.id, and cache_test_data.id.
def __eq__ | ( | self, | |
other | |||
) |
Use self.id as means of determining equality
Reimplemented from OrderedDict.
Definition at line 55 of file astconfigparser.py.
References adsi_flag.id, unistim_device.id, mbl_pvt.id, adsi_display.id, id, srv_result_datastore.id, adapter_pvt.id, adsi_event.id, adsi_soft_key.id, adsi_subscript.id, adsi_state.id, adsi_key_cmd.id, local_optimization.id, conf_menu_action.id, native_rtp_framehook_data.id, audiosocket_instance.id, Section.id, enum_result_datastore.id, ast_aoc_charging_association.id, ast_cc_monitor.id, ast_party_caller.id, ast_set_party_caller.id, ast_party_connected_line.id, ast_set_party_connected_line.id, ast_codec.id, ast_aeap_message_type.id, ast_fax_session_details.id, ast_fax_session.id, ast_geoloc_eprofile.id, ast_sip_transport_state.id, ast_sip_endpoint.id, ast_sip_session.id, ast_sip_session_sdp_handler.id, ast_rtp_engine_ice_candidate.id, ast_channel_snapshot_bridge.id, ast_endpoint_snapshot.id, ast_xmpp_message.id, ast_xmpp_buddy.id, aoc_ie_billing.id, sync_payload.id, bridge_sync.id, cel_linkedid.id, dns_HEADER.id, ast_endpoint.id, ast_framehook.id, io_rec.id, category_t.id, ast_state_cb.id, sched_id.id, ast_sorcery_object.id, cache_entry_key.id, stasis_message_type.id, stasis_state_proxy.id, stasis_state.id, stun_header.id, worker_thread.id, dundi_result_datastore.id, ast_ari_asterisk_get_object_args.id, ast_ari_asterisk_update_object_args.id, ast_ari_asterisk_delete_object_args.id, aeap_user_data.id, aeap_transaction.id, calendar_id.id, corosync_node.id, eprofiles_datastore.id, internal_state.id, exten_state_subscription.id, ast_sip_outbound_publish_state.id, mwi_subscription.id, stun_trans_id.id, hep_ctrl.id, unbound_resolver_data.id, smdi_msg_datastore.id, stasis_app_playback.id, app_forwards.id, Model.id, mock_payload.id, test_obj.id, and cache_test_data.id.
def __ge__ | ( | self, | |
other | |||
) |
Use self.id as means of determining equality
Definition at line 79 of file astconfigparser.py.
References adsi_flag.id, unistim_device.id, mbl_pvt.id, adsi_display.id, id, srv_result_datastore.id, adapter_pvt.id, adsi_event.id, adsi_soft_key.id, adsi_subscript.id, adsi_state.id, adsi_key_cmd.id, local_optimization.id, conf_menu_action.id, native_rtp_framehook_data.id, audiosocket_instance.id, Section.id, enum_result_datastore.id, ast_aoc_charging_association.id, ast_cc_monitor.id, ast_party_caller.id, ast_set_party_caller.id, ast_party_connected_line.id, ast_set_party_connected_line.id, ast_codec.id, ast_aeap_message_type.id, ast_fax_session_details.id, ast_fax_session.id, ast_geoloc_eprofile.id, ast_sip_transport_state.id, ast_sip_endpoint.id, ast_sip_session.id, ast_sip_session_sdp_handler.id, ast_rtp_engine_ice_candidate.id, ast_channel_snapshot_bridge.id, ast_endpoint_snapshot.id, ast_xmpp_message.id, ast_xmpp_buddy.id, aoc_ie_billing.id, sync_payload.id, bridge_sync.id, cel_linkedid.id, dns_HEADER.id, ast_endpoint.id, ast_framehook.id, io_rec.id, category_t.id, ast_state_cb.id, sched_id.id, ast_sorcery_object.id, cache_entry_key.id, stasis_message_type.id, stasis_state_proxy.id, stasis_state.id, stun_header.id, worker_thread.id, dundi_result_datastore.id, ast_ari_asterisk_get_object_args.id, ast_ari_asterisk_update_object_args.id, ast_ari_asterisk_delete_object_args.id, aeap_user_data.id, aeap_transaction.id, calendar_id.id, corosync_node.id, eprofiles_datastore.id, internal_state.id, exten_state_subscription.id, ast_sip_outbound_publish_state.id, mwi_subscription.id, stun_trans_id.id, hep_ctrl.id, unbound_resolver_data.id, smdi_msg_datastore.id, stasis_app_playback.id, app_forwards.id, Model.id, mock_payload.id, test_obj.id, and cache_test_data.id.
def __getitem__ | ( | self, | |
key | |||
) |
Get the value for the given key. If it is not found in the 'self' then check inside templates and defaults before declaring raising a KeyError exception.
Definition at line 121 of file astconfigparser.py.
References Section.get(), MultiOrderedConfigParser.get(), ast_jb_impl.get, and ast_speech_engine.get.
def __gt__ | ( | self, | |
other | |||
) |
Use self.id as means of determining equality
Definition at line 67 of file astconfigparser.py.
References adsi_flag.id, unistim_device.id, mbl_pvt.id, adsi_display.id, id, srv_result_datastore.id, adapter_pvt.id, adsi_event.id, adsi_soft_key.id, adsi_subscript.id, adsi_state.id, adsi_key_cmd.id, local_optimization.id, conf_menu_action.id, native_rtp_framehook_data.id, audiosocket_instance.id, Section.id, enum_result_datastore.id, ast_aoc_charging_association.id, ast_cc_monitor.id, ast_party_caller.id, ast_set_party_caller.id, ast_party_connected_line.id, ast_set_party_connected_line.id, ast_codec.id, ast_aeap_message_type.id, ast_fax_session_details.id, ast_fax_session.id, ast_geoloc_eprofile.id, ast_sip_transport_state.id, ast_sip_endpoint.id, ast_sip_session.id, ast_sip_session_sdp_handler.id, ast_rtp_engine_ice_candidate.id, ast_channel_snapshot_bridge.id, ast_endpoint_snapshot.id, ast_xmpp_message.id, ast_xmpp_buddy.id, aoc_ie_billing.id, sync_payload.id, bridge_sync.id, cel_linkedid.id, dns_HEADER.id, ast_endpoint.id, ast_framehook.id, io_rec.id, category_t.id, ast_state_cb.id, sched_id.id, ast_sorcery_object.id, cache_entry_key.id, stasis_message_type.id, stasis_state_proxy.id, stasis_state.id, stun_header.id, worker_thread.id, dundi_result_datastore.id, ast_ari_asterisk_get_object_args.id, ast_ari_asterisk_update_object_args.id, ast_ari_asterisk_delete_object_args.id, aeap_user_data.id, aeap_transaction.id, calendar_id.id, corosync_node.id, eprofiles_datastore.id, internal_state.id, exten_state_subscription.id, ast_sip_outbound_publish_state.id, mwi_subscription.id, stun_trans_id.id, hep_ctrl.id, unbound_resolver_data.id, smdi_msg_datastore.id, stasis_app_playback.id, app_forwards.id, Model.id, mock_payload.id, test_obj.id, and cache_test_data.id.
def __le__ | ( | self, | |
other | |||
) |
Use self.id as means of determining equality
Definition at line 73 of file astconfigparser.py.
References adsi_flag.id, unistim_device.id, mbl_pvt.id, adsi_display.id, id, srv_result_datastore.id, adapter_pvt.id, adsi_event.id, adsi_soft_key.id, adsi_subscript.id, adsi_state.id, adsi_key_cmd.id, local_optimization.id, conf_menu_action.id, native_rtp_framehook_data.id, audiosocket_instance.id, Section.id, enum_result_datastore.id, ast_aoc_charging_association.id, ast_cc_monitor.id, ast_party_caller.id, ast_set_party_caller.id, ast_party_connected_line.id, ast_set_party_connected_line.id, ast_codec.id, ast_aeap_message_type.id, ast_fax_session_details.id, ast_fax_session.id, ast_geoloc_eprofile.id, ast_sip_transport_state.id, ast_sip_endpoint.id, ast_sip_session.id, ast_sip_session_sdp_handler.id, ast_rtp_engine_ice_candidate.id, ast_channel_snapshot_bridge.id, ast_endpoint_snapshot.id, ast_xmpp_message.id, ast_xmpp_buddy.id, aoc_ie_billing.id, sync_payload.id, bridge_sync.id, cel_linkedid.id, dns_HEADER.id, ast_endpoint.id, ast_framehook.id, io_rec.id, category_t.id, ast_state_cb.id, sched_id.id, ast_sorcery_object.id, cache_entry_key.id, stasis_message_type.id, stasis_state_proxy.id, stasis_state.id, stun_header.id, worker_thread.id, dundi_result_datastore.id, ast_ari_asterisk_get_object_args.id, ast_ari_asterisk_update_object_args.id, ast_ari_asterisk_delete_object_args.id, aeap_user_data.id, aeap_transaction.id, calendar_id.id, corosync_node.id, eprofiles_datastore.id, internal_state.id, exten_state_subscription.id, ast_sip_outbound_publish_state.id, mwi_subscription.id, stun_trans_id.id, hep_ctrl.id, unbound_resolver_data.id, smdi_msg_datastore.id, stasis_app_playback.id, app_forwards.id, Model.id, mock_payload.id, test_obj.id, and cache_test_data.id.
def __lt__ | ( | self, | |
other | |||
) |
Use self.id as means of determining equality
Definition at line 61 of file astconfigparser.py.
References adsi_flag.id, unistim_device.id, mbl_pvt.id, adsi_display.id, id, srv_result_datastore.id, adapter_pvt.id, adsi_event.id, adsi_soft_key.id, adsi_subscript.id, adsi_state.id, adsi_key_cmd.id, local_optimization.id, conf_menu_action.id, native_rtp_framehook_data.id, audiosocket_instance.id, Section.id, enum_result_datastore.id, ast_aoc_charging_association.id, ast_cc_monitor.id, ast_party_caller.id, ast_set_party_caller.id, ast_party_connected_line.id, ast_set_party_connected_line.id, ast_codec.id, ast_aeap_message_type.id, ast_fax_session_details.id, ast_fax_session.id, ast_geoloc_eprofile.id, ast_sip_transport_state.id, ast_sip_endpoint.id, ast_sip_session.id, ast_sip_session_sdp_handler.id, ast_rtp_engine_ice_candidate.id, ast_channel_snapshot_bridge.id, ast_endpoint_snapshot.id, ast_xmpp_message.id, ast_xmpp_buddy.id, aoc_ie_billing.id, sync_payload.id, bridge_sync.id, cel_linkedid.id, dns_HEADER.id, ast_endpoint.id, ast_framehook.id, io_rec.id, category_t.id, ast_state_cb.id, sched_id.id, ast_sorcery_object.id, cache_entry_key.id, stasis_message_type.id, stasis_state_proxy.id, stasis_state.id, stun_header.id, worker_thread.id, dundi_result_datastore.id, ast_ari_asterisk_get_object_args.id, ast_ari_asterisk_update_object_args.id, ast_ari_asterisk_delete_object_args.id, aeap_user_data.id, aeap_transaction.id, calendar_id.id, corosync_node.id, eprofiles_datastore.id, internal_state.id, exten_state_subscription.id, ast_sip_outbound_publish_state.id, mwi_subscription.id, stun_trans_id.id, hep_ctrl.id, unbound_resolver_data.id, smdi_msg_datastore.id, stasis_app_playback.id, app_forwards.id, Model.id, mock_payload.id, test_obj.id, and cache_test_data.id.
def add_defaults | ( | self, | |
defaults | |||
) |
Add a list of defaults to the section. Defaults are sections such as 'general'
Definition at line 150 of file astconfigparser.py.
References Section._defaults, MultiOrderedConfigParser._defaults, and MultiOrderedDict.insert().
def add_templates | ( | self, | |
templates | |||
) |
Add a list of templates to the section.
Definition at line 159 of file astconfigparser.py.
References Section._templates, and MultiOrderedDict.insert().
def get | ( | self, | |
key, | |||
from_self = True , |
|||
from_templates = True , |
|||
from_defaults = True |
|||
) |
Get the values corresponding to a given key. The parameters to this function form a hierarchy that determines priority of the search. from_self takes priority over from_templates, and from_templates takes priority over from_defaults. Parameters: from_self - If True, search within the given section. from_templates - If True, search in this section's templates. from_defaults - If True, search within this section's defaults.
Definition at line 85 of file astconfigparser.py.
References Section._defaults, MultiOrderedConfigParser._defaults, and Section._templates.
Referenced by Section.__getitem__(), and MultiOrderedConfigParser.multi_get().
def get_merged | ( | self, | |
key | |||
) |
Return a list of values for a given key merged from default(s)
Definition at line 167 of file astconfigparser.py.
References Section._defaults, MultiOrderedConfigParser._defaults, Section._templates, and astconfigparser.merge_values().
def keys | ( | self, | |
self_only = False |
|||
) |
Get the keys from this section. If self_only is True, then keys from this section's defaults and templates are not included in the returned value
Reimplemented from OrderedDict.
Definition at line 129 of file astconfigparser.py.
References Section._defaults, MultiOrderedConfigParser._defaults, and Section._templates.
|
static |
Definition at line 39 of file astconfigparser.py.
id |
Definition at line 45 of file astconfigparser.py.
Referenced by Section.__cmp__(), Section.__eq__(), Section.__ge__(), Section.__gt__(), Section.__le__(), Section.__lt__(), and Model.load().