repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_documentation_string stringlengths 1 47.2k | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|
tcalmant/ipopo | pelix/framework.py | BundleContext.get_bundle | def get_bundle(self, bundle_id=None):
# type: (Union[Bundle, int]) -> Bundle
"""
Retrieves the :class:`~pelix.framework.Bundle` object for the bundle
matching the given ID (int). If no ID is given (None), the bundle
associated to this context is returned.
:param bundle_i... | python | def get_bundle(self, bundle_id=None):
# type: (Union[Bundle, int]) -> Bundle
"""
Retrieves the :class:`~pelix.framework.Bundle` object for the bundle
matching the given ID (int). If no ID is given (None), the bundle
associated to this context is returned.
:param bundle_i... | Retrieves the :class:`~pelix.framework.Bundle` object for the bundle
matching the given ID (int). If no ID is given (None), the bundle
associated to this context is returned.
:param bundle_id: A bundle ID (optional)
:return: The requested :class:`~pelix.framework.Bundle` object
... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/framework.py#L1551-L1569 |
tcalmant/ipopo | pelix/framework.py | BundleContext.get_service_reference | def get_service_reference(self, clazz, ldap_filter=None):
# type: (Optional[str], Optional[str]) -> Optional[ServiceReference]
"""
Returns a ServiceReference object for a service that implements and
was registered under the specified class
:param clazz: The class name with which... | python | def get_service_reference(self, clazz, ldap_filter=None):
# type: (Optional[str], Optional[str]) -> Optional[ServiceReference]
"""
Returns a ServiceReference object for a service that implements and
was registered under the specified class
:param clazz: The class name with which... | Returns a ServiceReference object for a service that implements and
was registered under the specified class
:param clazz: The class name with which the service was registered.
:param ldap_filter: A filter on service properties
:return: A service reference, None if not found | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/framework.py#L1621-L1637 |
tcalmant/ipopo | pelix/framework.py | BundleContext.get_service_references | def get_service_references(self, clazz, ldap_filter=None):
# type: (Optional[str], Optional[str]) -> Optional[List[ServiceReference]]
"""
Returns the service references for services that were registered under
the specified class by this bundle and matching the given filter
:para... | python | def get_service_references(self, clazz, ldap_filter=None):
# type: (Optional[str], Optional[str]) -> Optional[List[ServiceReference]]
"""
Returns the service references for services that were registered under
the specified class by this bundle and matching the given filter
:para... | Returns the service references for services that were registered under
the specified class by this bundle and matching the given filter
:param clazz: The class name with which the service was registered.
:param ldap_filter: A filter on service properties
:return: The list of references ... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/framework.py#L1639-L1656 |
tcalmant/ipopo | pelix/framework.py | BundleContext.install_package | def install_package(self, path, recursive=False):
# type: (str, bool) -> tuple
"""
Installs all the modules found in the given package (directory).
It is a utility method working like
:meth:`~pelix.framework.BundleContext.install_visiting`, with a visitor
accepting every ... | python | def install_package(self, path, recursive=False):
# type: (str, bool) -> tuple
"""
Installs all the modules found in the given package (directory).
It is a utility method working like
:meth:`~pelix.framework.BundleContext.install_visiting`, with a visitor
accepting every ... | Installs all the modules found in the given package (directory).
It is a utility method working like
:meth:`~pelix.framework.BundleContext.install_visiting`, with a visitor
accepting every module found.
:param path: Path of the package (folder)
:param recursive: If True, install... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/framework.py#L1686-L1701 |
tcalmant/ipopo | pelix/framework.py | BundleContext.register_service | def register_service(
self,
clazz,
service,
properties,
send_event=True,
factory=False,
prototype=False,
):
# type: (Union[List[Any], type, str], object, dict, bool, bool, bool) -> ServiceRegistration
"""
Registers a service
:p... | python | def register_service(
self,
clazz,
service,
properties,
send_event=True,
factory=False,
prototype=False,
):
# type: (Union[List[Any], type, str], object, dict, bool, bool, bool) -> ServiceRegistration
"""
Registers a service
:p... | Registers a service
:param clazz: Class or Classes (list) implemented by this service
:param service: The service instance
:param properties: The services properties (dictionary)
:param send_event: If not, doesn't trigger a service registered event
:param factory: If True, the g... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/framework.py#L1723-L1754 |
tcalmant/ipopo | pelix/framework.py | BundleContext.unget_service | def unget_service(self, reference):
# type: (ServiceReference) -> bool
"""
Disables a reference to the service
:return: True if the bundle was using this reference, else False
"""
# Lose the dependency
return self.__framework._registry.unget_service(
... | python | def unget_service(self, reference):
# type: (ServiceReference) -> bool
"""
Disables a reference to the service
:return: True if the bundle was using this reference, else False
"""
# Lose the dependency
return self.__framework._registry.unget_service(
... | Disables a reference to the service
:return: True if the bundle was using this reference, else False | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/framework.py#L1784-L1794 |
tcalmant/ipopo | pelix/framework.py | FrameworkFactory.get_framework | def get_framework(cls, properties=None):
# type: (Optional[dict]) -> Framework
"""
If it doesn't exist yet, creates a framework with the given properties,
else returns the current framework instance.
:return: A Pelix instance
"""
if cls.__singleton is None:
... | python | def get_framework(cls, properties=None):
# type: (Optional[dict]) -> Framework
"""
If it doesn't exist yet, creates a framework with the given properties,
else returns the current framework instance.
:return: A Pelix instance
"""
if cls.__singleton is None:
... | If it doesn't exist yet, creates a framework with the given properties,
else returns the current framework instance.
:return: A Pelix instance | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/framework.py#L1809-L1822 |
tcalmant/ipopo | pelix/framework.py | FrameworkFactory.delete_framework | def delete_framework(cls, framework=None):
# type: (Optional[Framework]) -> bool
# pylint: disable=W0212
"""
Removes the framework singleton
:return: True on success, else False
"""
if framework is None:
framework = cls.__singleton
if framewo... | python | def delete_framework(cls, framework=None):
# type: (Optional[Framework]) -> bool
# pylint: disable=W0212
"""
Removes the framework singleton
:return: True on success, else False
"""
if framework is None:
framework = cls.__singleton
if framewo... | Removes the framework singleton
:return: True on success, else False | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/framework.py#L1841-L1877 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_matching_interfaces | def get_matching_interfaces(object_class, exported_intfs):
# type: (List[str], Optional[List[str]]) -> Optional[List[str]]
"""
Returns the list of interfaces matching the export property
:param object_class: The specifications of the service
:param exported_intfs: The declared exported interfaces
... | python | def get_matching_interfaces(object_class, exported_intfs):
# type: (List[str], Optional[List[str]]) -> Optional[List[str]]
"""
Returns the list of interfaces matching the export property
:param object_class: The specifications of the service
:param exported_intfs: The declared exported interfaces
... | Returns the list of interfaces matching the export property
:param object_class: The specifications of the service
:param exported_intfs: The declared exported interfaces
:return: The list of declared exported interfaces | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1109-L1129 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_prop_value | def get_prop_value(name, props, default=None):
# type: (str, Dict[str, Any], Any) -> Any
"""
Returns the value of a property or the default one
:param name: Name of a property
:param props: Dictionary of properties
:param default: Default value
:return: The value of the property or the defa... | python | def get_prop_value(name, props, default=None):
# type: (str, Dict[str, Any], Any) -> Any
"""
Returns the value of a property or the default one
:param name: Name of a property
:param props: Dictionary of properties
:param default: Default value
:return: The value of the property or the defa... | Returns the value of a property or the default one
:param name: Name of a property
:param props: Dictionary of properties
:param default: Default value
:return: The value of the property or the default one | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1132-L1148 |
tcalmant/ipopo | pelix/rsa/__init__.py | set_prop_if_null | def set_prop_if_null(name, props, if_null):
# type: (str, Dict[str, Any], Any) -> None
"""
Updates the value of a property if the previous one was None
:param name: Name of the property
:param props: Dictionary of properties
:param if_null: Value to insert if the previous was None
"""
v... | python | def set_prop_if_null(name, props, if_null):
# type: (str, Dict[str, Any], Any) -> None
"""
Updates the value of a property if the previous one was None
:param name: Name of the property
:param props: Dictionary of properties
:param if_null: Value to insert if the previous was None
"""
v... | Updates the value of a property if the previous one was None
:param name: Name of the property
:param props: Dictionary of properties
:param if_null: Value to insert if the previous was None | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1151-L1162 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_string_plus_property_value | def get_string_plus_property_value(value):
# type: (Any) -> Optional[List[str]]
"""
Converts a string or list of string into a list of strings
:param value: A string or a list of strings
:return: A list of strings or None
"""
if value:
if isinstance(value, str):
return [... | python | def get_string_plus_property_value(value):
# type: (Any) -> Optional[List[str]]
"""
Converts a string or list of string into a list of strings
:param value: A string or a list of strings
:return: A list of strings or None
"""
if value:
if isinstance(value, str):
return [... | Converts a string or list of string into a list of strings
:param value: A string or a list of strings
:return: A list of strings or None | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1165-L1181 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_string_plus_property | def get_string_plus_property(name, props, default=None):
# type: (str, Dict[str, Any], Optional[Any]) -> Any
"""
Returns the value of the given property or the default value
:param name: A property name
:param props: A dictionary of properties
:param default: Value to return if the property doe... | python | def get_string_plus_property(name, props, default=None):
# type: (str, Dict[str, Any], Optional[Any]) -> Any
"""
Returns the value of the given property or the default value
:param name: A property name
:param props: A dictionary of properties
:param default: Value to return if the property doe... | Returns the value of the given property or the default value
:param name: A property name
:param props: A dictionary of properties
:param default: Value to return if the property doesn't exist
:return: The property value or the default one | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1211-L1222 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_exported_interfaces | def get_exported_interfaces(svc_ref, overriding_props=None):
# type: (ServiceReference, Optional[Dict[str, Any]]) -> Optional[List[str]]
"""
Looks for the interfaces exported by a service
:param svc_ref: Service reference
:param overriding_props: Properties overriding service ones
:return: The ... | python | def get_exported_interfaces(svc_ref, overriding_props=None):
# type: (ServiceReference, Optional[Dict[str, Any]]) -> Optional[List[str]]
"""
Looks for the interfaces exported by a service
:param svc_ref: Service reference
:param overriding_props: Properties overriding service ones
:return: The ... | Looks for the interfaces exported by a service
:param svc_ref: Service reference
:param overriding_props: Properties overriding service ones
:return: The list of exported interfaces | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1235-L1257 |
tcalmant/ipopo | pelix/rsa/__init__.py | validate_exported_interfaces | def validate_exported_interfaces(object_class, exported_intfs):
# type: (List[str], List[str]) -> bool
"""
Validates that the exported interfaces are all provided by the service
:param object_class: The specifications of a service
:param exported_intfs: The exported specifications
:return: True... | python | def validate_exported_interfaces(object_class, exported_intfs):
# type: (List[str], List[str]) -> bool
"""
Validates that the exported interfaces are all provided by the service
:param object_class: The specifications of a service
:param exported_intfs: The exported specifications
:return: True... | Validates that the exported interfaces are all provided by the service
:param object_class: The specifications of a service
:param exported_intfs: The exported specifications
:return: True if the exported specifications are all provided by the service | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1260-L1279 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_package_versions | def get_package_versions(intfs, props):
# type: (List[str], Dict[str, Any]) -> List[Tuple[str, str]]
"""
Gets the package version of interfaces
:param intfs: A list of interfaces
:param props: A dictionary containing endpoint package versions
:return: A list of tuples (package name, version)
... | python | def get_package_versions(intfs, props):
# type: (List[str], Dict[str, Any]) -> List[Tuple[str, str]]
"""
Gets the package version of interfaces
:param intfs: A list of interfaces
:param props: A dictionary containing endpoint package versions
:return: A list of tuples (package name, version)
... | Gets the package version of interfaces
:param intfs: A list of interfaces
:param props: A dictionary containing endpoint package versions
:return: A list of tuples (package name, version) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1296-L1313 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_rsa_props | def get_rsa_props(
object_class,
exported_cfgs,
remote_intents=None,
ep_svc_id=None,
fw_id=None,
pkg_vers=None,
service_intents=None,
):
"""
Constructs a dictionary of RSA properties from the given arguments
:param object_class: Service specifications
:param exported_cfgs: E... | python | def get_rsa_props(
object_class,
exported_cfgs,
remote_intents=None,
ep_svc_id=None,
fw_id=None,
pkg_vers=None,
service_intents=None,
):
"""
Constructs a dictionary of RSA properties from the given arguments
:param object_class: Service specifications
:param exported_cfgs: E... | Constructs a dictionary of RSA properties from the given arguments
:param object_class: Service specifications
:param exported_cfgs: Export configurations
:param remote_intents: Supported remote intents
:param ep_svc_id: Endpoint service ID
:param fw_id: Remote Framework ID
:param pkg_vers: Ver... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1369-L1421 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_ecf_props | def get_ecf_props(ep_id, ep_id_ns, rsvc_id=None, ep_ts=None):
"""
Prepares the ECF properties
:param ep_id: Endpoint ID
:param ep_id_ns: Namespace of the Endpoint ID
:param rsvc_id: Remote service ID
:param ep_ts: Timestamp of the endpoint
:return: A dictionary of ECF properties
"""
... | python | def get_ecf_props(ep_id, ep_id_ns, rsvc_id=None, ep_ts=None):
"""
Prepares the ECF properties
:param ep_id: Endpoint ID
:param ep_id_ns: Namespace of the Endpoint ID
:param rsvc_id: Remote service ID
:param ep_ts: Timestamp of the endpoint
:return: A dictionary of ECF properties
"""
... | Prepares the ECF properties
:param ep_id: Endpoint ID
:param ep_id_ns: Namespace of the Endpoint ID
:param rsvc_id: Remote service ID
:param ep_ts: Timestamp of the endpoint
:return: A dictionary of ECF properties | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1424-L1447 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_extra_props | def get_extra_props(props):
# type: (Dict[str, Any]) -> Dict[str, Any]
"""
Returns the extra properties, *i.e.* non-ECF, non-RSA properties
:param props: A dictionary of properties
:return: A filtered dictionary
"""
return {
key: value
for key, value in props.items()
... | python | def get_extra_props(props):
# type: (Dict[str, Any]) -> Dict[str, Any]
"""
Returns the extra properties, *i.e.* non-ECF, non-RSA properties
:param props: A dictionary of properties
:return: A filtered dictionary
"""
return {
key: value
for key, value in props.items()
... | Returns the extra properties, *i.e.* non-ECF, non-RSA properties
:param props: A dictionary of properties
:return: A filtered dictionary | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1450-L1464 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_edef_props | def get_edef_props(
object_class,
exported_cfgs,
ep_namespace,
ep_id,
ecf_ep_id,
ep_rsvc_id,
ep_ts,
remote_intents=None,
fw_id=None,
pkg_ver=None,
service_intents=None,
):
"""
Prepares the EDEF properties of an endpoint, merge of RSA and ECF
properties
"""
... | python | def get_edef_props(
object_class,
exported_cfgs,
ep_namespace,
ep_id,
ecf_ep_id,
ep_rsvc_id,
ep_ts,
remote_intents=None,
fw_id=None,
pkg_ver=None,
service_intents=None,
):
"""
Prepares the EDEF properties of an endpoint, merge of RSA and ECF
properties
"""
... | Prepares the EDEF properties of an endpoint, merge of RSA and ECF
properties | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1467-L1494 |
tcalmant/ipopo | pelix/rsa/__init__.py | get_dot_properties | def get_dot_properties(prefix, props, remove_prefix):
# type: (str, Dict[str, Any], bool) -> Dict[str, Any]
"""
Gets the properties starting with the given prefix
"""
result_props = {}
if props:
dot_keys = [x for x in props.keys() if x.startswith(prefix + ".")]
for dot_key in dot... | python | def get_dot_properties(prefix, props, remove_prefix):
# type: (str, Dict[str, Any], bool) -> Dict[str, Any]
"""
Gets the properties starting with the given prefix
"""
result_props = {}
if props:
dot_keys = [x for x in props.keys() if x.startswith(prefix + ".")]
for dot_key in dot... | Gets the properties starting with the given prefix | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1513-L1527 |
tcalmant/ipopo | pelix/rsa/__init__.py | copy_non_reserved | def copy_non_reserved(props, target):
# type: (Dict[str, Any], Dict[str, Any]) -> Dict[str, Any]
"""
Copies all properties with non-reserved names from ``props`` to ``target``
:param props: A dictionary of properties
:param target: Another dictionary
:return: The target dictionary
"""
t... | python | def copy_non_reserved(props, target):
# type: (Dict[str, Any], Dict[str, Any]) -> Dict[str, Any]
"""
Copies all properties with non-reserved names from ``props`` to ``target``
:param props: A dictionary of properties
:param target: Another dictionary
:return: The target dictionary
"""
t... | Copies all properties with non-reserved names from ``props`` to ``target``
:param props: A dictionary of properties
:param target: Another dictionary
:return: The target dictionary | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1563-L1579 |
tcalmant/ipopo | pelix/rsa/__init__.py | copy_non_ecf | def copy_non_ecf(props, target):
# type: (Dict[str, Any], Dict[str, Any]) -> Dict[str, Any]
"""
Copies non-ECF properties from ``props`` to ``target``
:param props: An input dictionary
:param target: The dictionary to copy non-ECF properties to
:return: The ``target`` dictionary
"""
tar... | python | def copy_non_ecf(props, target):
# type: (Dict[str, Any], Dict[str, Any]) -> Dict[str, Any]
"""
Copies non-ECF properties from ``props`` to ``target``
:param props: An input dictionary
:param target: The dictionary to copy non-ECF properties to
:return: The ``target`` dictionary
"""
tar... | Copies non-ECF properties from ``props`` to ``target``
:param props: An input dictionary
:param target: The dictionary to copy non-ECF properties to
:return: The ``target`` dictionary | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1582-L1594 |
tcalmant/ipopo | pelix/rsa/__init__.py | set_append | def set_append(input_set, item):
# type: (set, Any) -> set
"""
Appends in-place the given item to the set.
If the item is a list, all elements are added to the set.
:param input_set: An existing set
:param item: The item or list of items to add
:return: The given set
"""
if item:
... | python | def set_append(input_set, item):
# type: (set, Any) -> set
"""
Appends in-place the given item to the set.
If the item is a list, all elements are added to the set.
:param input_set: An existing set
:param item: The item or list of items to add
:return: The given set
"""
if item:
... | Appends in-place the given item to the set.
If the item is a list, all elements are added to the set.
:param input_set: An existing set
:param item: The item or list of items to add
:return: The given set | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L1597-L1612 |
tcalmant/ipopo | pelix/rsa/__init__.py | RemoteServiceAdminEvent.fromimportreg | def fromimportreg(cls, bundle, import_reg):
# type: (Bundle, ImportRegistration) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from an ImportRegistration
"""
exc = import_reg.get_exception()
if exc:
return RemoteServiceAdminEvent(
... | python | def fromimportreg(cls, bundle, import_reg):
# type: (Bundle, ImportRegistration) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from an ImportRegistration
"""
exc = import_reg.get_exception()
if exc:
return RemoteServiceAdminEvent(
... | Creates a RemoteServiceAdminEvent object from an ImportRegistration | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L769-L796 |
tcalmant/ipopo | pelix/rsa/__init__.py | RemoteServiceAdminEvent.fromexportreg | def fromexportreg(cls, bundle, export_reg):
# type: (Bundle, ExportRegistration) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from an ExportRegistration
"""
exc = export_reg.get_exception()
if exc:
return RemoteServiceAdminEvent(
... | python | def fromexportreg(cls, bundle, export_reg):
# type: (Bundle, ExportRegistration) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from an ExportRegistration
"""
exc = export_reg.get_exception()
if exc:
return RemoteServiceAdminEvent(
... | Creates a RemoteServiceAdminEvent object from an ExportRegistration | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L799-L826 |
tcalmant/ipopo | pelix/rsa/__init__.py | RemoteServiceAdminEvent.fromexportupdate | def fromexportupdate(cls, bundle, export_reg):
# type: (Bundle, ExportRegistration) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from the update of an
ExportRegistration
"""
exc = export_reg.get_exception()
if exc:
return Rem... | python | def fromexportupdate(cls, bundle, export_reg):
# type: (Bundle, ExportRegistration) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from the update of an
ExportRegistration
"""
exc = export_reg.get_exception()
if exc:
return Rem... | Creates a RemoteServiceAdminEvent object from the update of an
ExportRegistration | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L829-L857 |
tcalmant/ipopo | pelix/rsa/__init__.py | RemoteServiceAdminEvent.fromimportupdate | def fromimportupdate(cls, bundle, import_reg):
# type: (Bundle, ImportRegistration) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from the update of an
ImportRegistration
"""
exc = import_reg.get_exception()
if exc:
return Rem... | python | def fromimportupdate(cls, bundle, import_reg):
# type: (Bundle, ImportRegistration) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from the update of an
ImportRegistration
"""
exc = import_reg.get_exception()
if exc:
return Rem... | Creates a RemoteServiceAdminEvent object from the update of an
ImportRegistration | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L860-L888 |
tcalmant/ipopo | pelix/rsa/__init__.py | RemoteServiceAdminEvent.fromimportunreg | def fromimportunreg(
cls, bundle, cid, rsid, import_ref, exception, endpoint
):
# type: (Bundle, Tuple[str, str], Tuple[Tuple[str, str], int], ImportReference, Optional[Tuple[Any, Any, Any]], EndpointDescription) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object... | python | def fromimportunreg(
cls, bundle, cid, rsid, import_ref, exception, endpoint
):
# type: (Bundle, Tuple[str, str], Tuple[Tuple[str, str], int], ImportReference, Optional[Tuple[Any, Any, Any]], EndpointDescription) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object... | Creates a RemoteServiceAdminEvent object from the departure of an
ImportRegistration | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L891-L907 |
tcalmant/ipopo | pelix/rsa/__init__.py | RemoteServiceAdminEvent.fromexportunreg | def fromexportunreg(
cls, bundle, exporterid, rsid, export_ref, exception, endpoint
):
# type: (Bundle, Tuple[str, str], Tuple[Tuple[str, str], int], ExportReference, Optional[Tuple[Any, Any, Any]], EndpointDescription) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent... | python | def fromexportunreg(
cls, bundle, exporterid, rsid, export_ref, exception, endpoint
):
# type: (Bundle, Tuple[str, str], Tuple[Tuple[str, str], int], ExportReference, Optional[Tuple[Any, Any, Any]], EndpointDescription) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent... | Creates a RemoteServiceAdminEvent object from the departure of an
ExportRegistration | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L910-L926 |
tcalmant/ipopo | pelix/rsa/__init__.py | RemoteServiceAdminEvent.fromimporterror | def fromimporterror(cls, bundle, importerid, rsid, exception, endpoint):
# type: (Bundle, Tuple[str, str], Tuple[Tuple[str, str], int], Optional[Tuple[Any, Any, Any]], EndpointDescription) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from an import error
"""
... | python | def fromimporterror(cls, bundle, importerid, rsid, exception, endpoint):
# type: (Bundle, Tuple[str, str], Tuple[Tuple[str, str], int], Optional[Tuple[Any, Any, Any]], EndpointDescription) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from an import error
"""
... | Creates a RemoteServiceAdminEvent object from an import error | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L929-L943 |
tcalmant/ipopo | pelix/rsa/__init__.py | RemoteServiceAdminEvent.fromexporterror | def fromexporterror(cls, bundle, exporterid, rsid, exception, endpoint):
# type: (Bundle, Tuple[str, str], Tuple[Tuple[str, str], int], Optional[Tuple[Any, Any, Any]], EndpointDescription) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from an export error
"""
... | python | def fromexporterror(cls, bundle, exporterid, rsid, exception, endpoint):
# type: (Bundle, Tuple[str, str], Tuple[Tuple[str, str], int], Optional[Tuple[Any, Any, Any]], EndpointDescription) -> RemoteServiceAdminEvent
"""
Creates a RemoteServiceAdminEvent object from an export error
"""
... | Creates a RemoteServiceAdminEvent object from an export error | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/__init__.py#L946-L960 |
tcalmant/ipopo | pelix/ipopo/waiting.py | IPopoWaitingList._try_instantiate | def _try_instantiate(self, ipopo, factory, component):
# type: (Any, str, str) -> None
"""
Tries to instantiate a component from the queue. Hides all exceptions.
:param ipopo: The iPOPO service
:param factory: Component factory
:param component: Component name
""... | python | def _try_instantiate(self, ipopo, factory, component):
# type: (Any, str, str) -> None
"""
Tries to instantiate a component from the queue. Hides all exceptions.
:param ipopo: The iPOPO service
:param factory: Component factory
:param component: Component name
""... | Tries to instantiate a component from the queue. Hides all exceptions.
:param ipopo: The iPOPO service
:param factory: Component factory
:param component: Component name | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/ipopo/waiting.py#L93-L121 |
tcalmant/ipopo | pelix/ipopo/waiting.py | IPopoWaitingList._start | def _start(self):
"""
Starts the instantiation queue (called by its bundle activator)
"""
try:
# Try to register to factory events
with use_ipopo(self.__context) as ipopo:
ipopo.add_listener(self)
except BundleException:
# Servi... | python | def _start(self):
"""
Starts the instantiation queue (called by its bundle activator)
"""
try:
# Try to register to factory events
with use_ipopo(self.__context) as ipopo:
ipopo.add_listener(self)
except BundleException:
# Servi... | Starts the instantiation queue (called by its bundle activator) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/ipopo/waiting.py#L123-L136 |
tcalmant/ipopo | pelix/ipopo/waiting.py | IPopoWaitingList._stop | def _stop(self):
"""
Stops the instantiation queue (called by its bundle activator)
"""
# Unregisters the iPOPO service listener
self.__context.remove_service_listener(self)
try:
# Try to register to factory events
with use_ipopo(self.__context) a... | python | def _stop(self):
"""
Stops the instantiation queue (called by its bundle activator)
"""
# Unregisters the iPOPO service listener
self.__context.remove_service_listener(self)
try:
# Try to register to factory events
with use_ipopo(self.__context) a... | Stops the instantiation queue (called by its bundle activator) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/ipopo/waiting.py#L138-L151 |
tcalmant/ipopo | pelix/ipopo/waiting.py | IPopoWaitingList._clear | def _clear(self):
"""
Clear all references (called by its bundle activator)
"""
self.__names.clear()
self.__queue.clear()
self.__context = None | python | def _clear(self):
"""
Clear all references (called by its bundle activator)
"""
self.__names.clear()
self.__queue.clear()
self.__context = None | Clear all references (called by its bundle activator) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/ipopo/waiting.py#L153-L159 |
tcalmant/ipopo | pelix/ipopo/waiting.py | IPopoWaitingList.service_changed | def service_changed(self, event):
# type: (ServiceEvent) -> None
"""
Handles an event about the iPOPO service
"""
kind = event.get_kind()
if kind == ServiceEvent.REGISTERED:
# iPOPO service registered: register to factory events
with use_ipopo(self... | python | def service_changed(self, event):
# type: (ServiceEvent) -> None
"""
Handles an event about the iPOPO service
"""
kind = event.get_kind()
if kind == ServiceEvent.REGISTERED:
# iPOPO service registered: register to factory events
with use_ipopo(self... | Handles an event about the iPOPO service | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/ipopo/waiting.py#L161-L170 |
tcalmant/ipopo | pelix/ipopo/waiting.py | IPopoWaitingList.handle_ipopo_event | def handle_ipopo_event(self, event):
# type: (IPopoEvent) -> None
"""
Handles an iPOPO event
:param event: iPOPO event bean
"""
kind = event.get_kind()
if kind == IPopoEvent.REGISTERED:
# A factory has been registered
try:
... | python | def handle_ipopo_event(self, event):
# type: (IPopoEvent) -> None
"""
Handles an iPOPO event
:param event: iPOPO event bean
"""
kind = event.get_kind()
if kind == IPopoEvent.REGISTERED:
# A factory has been registered
try:
... | Handles an iPOPO event
:param event: iPOPO event bean | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/ipopo/waiting.py#L172-L197 |
tcalmant/ipopo | pelix/ipopo/waiting.py | IPopoWaitingList.add | def add(self, factory, component, properties=None):
# type: (str, str, dict) -> None
"""
Enqueues the instantiation of the given component
:param factory: Factory name
:param component: Component name
:param properties: Component properties
:raise ValueError: Com... | python | def add(self, factory, component, properties=None):
# type: (str, str, dict) -> None
"""
Enqueues the instantiation of the given component
:param factory: Factory name
:param component: Component name
:param properties: Component properties
:raise ValueError: Com... | Enqueues the instantiation of the given component
:param factory: Factory name
:param component: Component name
:param properties: Component properties
:raise ValueError: Component name already reserved in the queue
:raise Exception: Error instantiating the component | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/ipopo/waiting.py#L199-L230 |
tcalmant/ipopo | pelix/ipopo/waiting.py | IPopoWaitingList.remove | def remove(self, component):
# type: (str) -> None
"""
Kills/Removes the component with the given name
:param component: A component name
:raise KeyError: Unknown component
"""
with self.__lock:
# Find its factory
factory = self.__names.po... | python | def remove(self, component):
# type: (str) -> None
"""
Kills/Removes the component with the given name
:param component: A component name
:raise KeyError: Unknown component
"""
with self.__lock:
# Find its factory
factory = self.__names.po... | Kills/Removes the component with the given name
:param component: A component name
:raise KeyError: Unknown component | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/ipopo/waiting.py#L232-L258 |
tcalmant/ipopo | pelix/shell/remote.py | _create_server | def _create_server(
shell,
server_address,
port,
cert_file=None,
key_file=None,
key_password=None,
ca_file=None,
):
"""
Creates the TCP console on the given address and port
:param shell: The remote shell handler
:param server_address: Server bound address
:param port: S... | python | def _create_server(
shell,
server_address,
port,
cert_file=None,
key_file=None,
key_password=None,
ca_file=None,
):
"""
Creates the TCP console on the given address and port
:param shell: The remote shell handler
:param server_address: Server bound address
:param port: S... | Creates the TCP console on the given address and port
:param shell: The remote shell handler
:param server_address: Server bound address
:param port: Server port
:param cert_file: Path to the server certificate
:param key_file: Path to the server private key
:param key_password: Password for th... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/remote.py#L370-L425 |
tcalmant/ipopo | pelix/shell/remote.py | _run_interpreter | def _run_interpreter(variables, banner):
"""
Runs a Python interpreter console and blocks until the user exits it.
:param variables: Interpreters variables (locals)
:param banner: Start-up banners
"""
# Script-only imports
import code
try:
import readline
import rlcompl... | python | def _run_interpreter(variables, banner):
"""
Runs a Python interpreter console and blocks until the user exits it.
:param variables: Interpreters variables (locals)
:param banner: Start-up banners
"""
# Script-only imports
import code
try:
import readline
import rlcompl... | Runs a Python interpreter console and blocks until the user exits it.
:param variables: Interpreters variables (locals)
:param banner: Start-up banners | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/remote.py#L565-L587 |
tcalmant/ipopo | pelix/shell/remote.py | main | def main(argv=None):
"""
Script entry point
:param argv: Script arguments (None for sys.argv)
:return: An exit code or None
"""
# Prepare arguments
parser = argparse.ArgumentParser(
prog="pelix.shell.remote",
parents=[make_common_parser()],
description="Pelix Remote ... | python | def main(argv=None):
"""
Script entry point
:param argv: Script arguments (None for sys.argv)
:return: An exit code or None
"""
# Prepare arguments
parser = argparse.ArgumentParser(
prog="pelix.shell.remote",
parents=[make_common_parser()],
description="Pelix Remote ... | Script entry point
:param argv: Script arguments (None for sys.argv)
:return: An exit code or None | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/remote.py#L590-L767 |
tcalmant/ipopo | pelix/shell/remote.py | RemoteConsole.send | def send(self, data):
"""
Tries to send data to the client.
:param data: Data to be sent
:return: True if the data was sent, False on error
"""
if data is not None:
data = data.encode("UTF-8")
try:
self.wfile.write(data)
self.... | python | def send(self, data):
"""
Tries to send data to the client.
:param data: Data to be sent
:return: True if the data was sent, False on error
"""
if data is not None:
data = data.encode("UTF-8")
try:
self.wfile.write(data)
self.... | Tries to send data to the client.
:param data: Data to be sent
:return: True if the data was sent, False on error | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/remote.py#L138-L157 |
tcalmant/ipopo | pelix/shell/remote.py | RemoteConsole.handle | def handle(self):
"""
Handles a TCP client
"""
_logger.info(
"RemoteConsole client connected: [%s]:%d",
self.client_address[0],
self.client_address[1],
)
# Prepare the session
session = beans.ShellSession(
beans.IOH... | python | def handle(self):
"""
Handles a TCP client
"""
_logger.info(
"RemoteConsole client connected: [%s]:%d",
self.client_address[0],
self.client_address[1],
)
# Prepare the session
session = beans.ShellSession(
beans.IOH... | Handles a TCP client | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/remote.py#L159-L243 |
tcalmant/ipopo | pelix/shell/remote.py | ThreadingTCPServerFamily.get_request | def get_request(self):
"""
Accepts a new client. Sets up SSL wrapping if necessary.
:return: A tuple: (client socket, client address tuple)
"""
# Accept the client
client_socket, client_address = self.socket.accept()
if ssl is not None and self.cert_file:
... | python | def get_request(self):
"""
Accepts a new client. Sets up SSL wrapping if necessary.
:return: A tuple: (client socket, client address tuple)
"""
# Accept the client
client_socket, client_address = self.socket.accept()
if ssl is not None and self.cert_file:
... | Accepts a new client. Sets up SSL wrapping if necessary.
:return: A tuple: (client socket, client address tuple) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/remote.py#L301-L352 |
tcalmant/ipopo | pelix/shell/remote.py | ThreadingTCPServerFamily.process_request | def process_request(self, request, client_address):
"""
Starts a new thread to process the request, adding the client address
in its name.
"""
thread = threading.Thread(
name="RemoteShell-{0}-Client-{1}".format(
self.server_address[1], client_address[:... | python | def process_request(self, request, client_address):
"""
Starts a new thread to process the request, adding the client address
in its name.
"""
thread = threading.Thread(
name="RemoteShell-{0}-Client-{1}".format(
self.server_address[1], client_address[:... | Starts a new thread to process the request, adding the client address
in its name. | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/remote.py#L354-L367 |
tcalmant/ipopo | pelix/shell/completion/ipopo.py | ComponentFactoryCompleter.display_hook | def display_hook(prompt, session, context, matches, longest_match_len):
# type: (str, ShellSession, BundleContext, List[str], int) -> None
"""
Displays the available services matches and the service details
:param prompt: Shell prompt string
:param session: Current shell session... | python | def display_hook(prompt, session, context, matches, longest_match_len):
# type: (str, ShellSession, BundleContext, List[str], int) -> None
"""
Displays the available services matches and the service details
:param prompt: Shell prompt string
:param session: Current shell session... | Displays the available services matches and the service details
:param prompt: Shell prompt string
:param session: Current shell session (for display)
:param context: BundleContext of the shell
:param matches: List of words matching the substitution
:param longest_match_len: Len... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/completion/ipopo.py#L79-L110 |
tcalmant/ipopo | pelix/shell/completion/ipopo.py | ComponentFactoryCompleter.complete | def complete(
self, config, prompt, session, context, current_arguments, current
):
# type: (CompletionInfo, str, ShellSession, BundleContext, List[str], str) -> List[str]
"""
Returns the list of services IDs matching the current state
:param config: Configuration of the cur... | python | def complete(
self, config, prompt, session, context, current_arguments, current
):
# type: (CompletionInfo, str, ShellSession, BundleContext, List[str], str) -> List[str]
"""
Returns the list of services IDs matching the current state
:param config: Configuration of the cur... | Returns the list of services IDs matching the current state
:param config: Configuration of the current completion
:param prompt: Shell prompt (for re-display)
:param session: Shell session (to display in shell)
:param context: Bundle context of the Shell bundle
:param current_a... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/completion/ipopo.py#L112-L136 |
tcalmant/ipopo | pelix/shell/completion/ipopo.py | ComponentInstanceCompleter.display_hook | def display_hook(prompt, session, context, matches, longest_match_len):
# type: (str, ShellSession, BundleContext, List[str], int) -> None
"""
Displays the available services matches and the service details
:param prompt: Shell prompt string
:param session: Current shell session... | python | def display_hook(prompt, session, context, matches, longest_match_len):
# type: (str, ShellSession, BundleContext, List[str], int) -> None
"""
Displays the available services matches and the service details
:param prompt: Shell prompt string
:param session: Current shell session... | Displays the available services matches and the service details
:param prompt: Shell prompt string
:param session: Current shell session (for display)
:param context: BundleContext of the shell
:param matches: List of words matching the substitution
:param longest_match_len: Len... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/completion/ipopo.py#L145-L175 |
tcalmant/ipopo | pelix/shell/completion/ipopo.py | ComponentInstanceCompleter.complete | def complete(
self, config, prompt, session, context, current_arguments, current
):
# type: (CompletionInfo, str, ShellSession, BundleContext, List[str], str) -> List[str]
"""
Returns the list of services IDs matching the current state
:param config: Configuration of the cur... | python | def complete(
self, config, prompt, session, context, current_arguments, current
):
# type: (CompletionInfo, str, ShellSession, BundleContext, List[str], str) -> List[str]
"""
Returns the list of services IDs matching the current state
:param config: Configuration of the cur... | Returns the list of services IDs matching the current state
:param config: Configuration of the current completion
:param prompt: Shell prompt (for re-display)
:param session: Shell session (to display in shell)
:param context: Bundle context of the Shell bundle
:param current_a... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/completion/ipopo.py#L177-L201 |
tcalmant/ipopo | pelix/shell/completion/ipopo.py | ComponentFactoryPropertiesCompleter.complete | def complete(
self, config, prompt, session, context, current_arguments, current
):
# type: (CompletionInfo, str, ShellSession, BundleContext, List[str], str) -> List[str]
"""
Returns the list of services IDs matching the current state
:param config: Configuration of the cur... | python | def complete(
self, config, prompt, session, context, current_arguments, current
):
# type: (CompletionInfo, str, ShellSession, BundleContext, List[str], str) -> List[str]
"""
Returns the list of services IDs matching the current state
:param config: Configuration of the cur... | Returns the list of services IDs matching the current state
:param config: Configuration of the current completion
:param prompt: Shell prompt (for re-display)
:param session: Shell session (to display in shell)
:param context: Bundle context of the Shell bundle
:param current_a... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/shell/completion/ipopo.py#L209-L254 |
tcalmant/ipopo | pelix/http/basic.py | _HTTPServletRequest.get_header | def get_header(self, name, default=None):
"""
Retrieves the value of a header
"""
return self._handler.headers.get(name, default) | python | def get_header(self, name, default=None):
"""
Retrieves the value of a header
"""
return self._handler.headers.get(name, default) | Retrieves the value of a header | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/http/basic.py#L135-L139 |
tcalmant/ipopo | pelix/http/basic.py | _HTTPServletResponse.end_headers | def end_headers(self):
"""
Ends the headers part
"""
# Send them all at once
for name, value in self._headers.items():
self._handler.send_header(name, value)
self._handler.end_headers() | python | def end_headers(self):
"""
Ends the headers part
"""
# Send them all at once
for name, value in self._headers.items():
self._handler.send_header(name, value)
self._handler.end_headers() | Ends the headers part | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/http/basic.py#L219-L227 |
tcalmant/ipopo | pelix/http/basic.py | _RequestHandler.log_error | def log_error(self, message, *args, **kwargs):
# pylint: disable=W0221
"""
Log server error
"""
self._service.log(logging.ERROR, message, *args, **kwargs) | python | def log_error(self, message, *args, **kwargs):
# pylint: disable=W0221
"""
Log server error
"""
self._service.log(logging.ERROR, message, *args, **kwargs) | Log server error | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/http/basic.py#L315-L320 |
tcalmant/ipopo | pelix/http/basic.py | _RequestHandler.log_request | def log_request(self, code="-", size="-"):
"""
Logs a request to the server
"""
self._service.log(logging.DEBUG, '"%s" %s', self.requestline, code) | python | def log_request(self, code="-", size="-"):
"""
Logs a request to the server
"""
self._service.log(logging.DEBUG, '"%s" %s', self.requestline, code) | Logs a request to the server | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/http/basic.py#L322-L326 |
tcalmant/ipopo | pelix/http/basic.py | _RequestHandler.send_no_servlet_response | def send_no_servlet_response(self):
"""
Default response sent when no servlet is found for the requested path
"""
# Use the helper to send the error page
response = _HTTPServletResponse(self)
response.send_content(404, self._service.make_not_found_page(self.path)) | python | def send_no_servlet_response(self):
"""
Default response sent when no servlet is found for the requested path
"""
# Use the helper to send the error page
response = _HTTPServletResponse(self)
response.send_content(404, self._service.make_not_found_page(self.path)) | Default response sent when no servlet is found for the requested path | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/http/basic.py#L328-L334 |
tcalmant/ipopo | pelix/http/basic.py | _RequestHandler.send_exception | def send_exception(self, response):
"""
Sends an exception page with a 500 error code.
Must be called from inside the exception handling block.
:param response: The response handler
"""
# Get a formatted stack trace
stack = traceback.format_exc()
# Log t... | python | def send_exception(self, response):
"""
Sends an exception page with a 500 error code.
Must be called from inside the exception handling block.
:param response: The response handler
"""
# Get a formatted stack trace
stack = traceback.format_exc()
# Log t... | Sends an exception page with a 500 error code.
Must be called from inside the exception handling block.
:param response: The response handler | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/http/basic.py#L336-L354 |
tcalmant/ipopo | pelix/http/basic.py | _HttpServerFamily.server_bind | def server_bind(self):
"""
Override server_bind to store the server name, even in IronPython.
See https://ironpython.codeplex.com/workitem/29477
"""
TCPServer.server_bind(self)
host, port = self.socket.getsockname()[:2]
self.server_port = port
try:
... | python | def server_bind(self):
"""
Override server_bind to store the server name, even in IronPython.
See https://ironpython.codeplex.com/workitem/29477
"""
TCPServer.server_bind(self)
host, port = self.socket.getsockname()[:2]
self.server_port = port
try:
... | Override server_bind to store the server name, even in IronPython.
See https://ironpython.codeplex.com/workitem/29477 | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/http/basic.py#L419-L432 |
tcalmant/ipopo | pelix/rsa/endpointdescription.py | encode_list | def encode_list(key, list_):
# type: (str, Iterable) -> Dict[str, str]
"""
Converts a list into a space-separated string and puts it in a dictionary
:param key: Dictionary key to store the list
:param list_: A list of objects
:return: A dictionary key->string or an empty dictionary
"""
... | python | def encode_list(key, list_):
# type: (str, Iterable) -> Dict[str, str]
"""
Converts a list into a space-separated string and puts it in a dictionary
:param key: Dictionary key to store the list
:param list_: A list of objects
:return: A dictionary key->string or an empty dictionary
"""
... | Converts a list into a space-separated string and puts it in a dictionary
:param key: Dictionary key to store the list
:param list_: A list of objects
:return: A dictionary key->string or an empty dictionary | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/endpointdescription.py#L89-L100 |
tcalmant/ipopo | pelix/rsa/endpointdescription.py | package_name | def package_name(package):
# type: (str) -> str
"""
Returns the package name of the given module name
"""
if not package:
return ""
lastdot = package.rfind(".")
if lastdot == -1:
return package
return package[:lastdot] | python | def package_name(package):
# type: (str) -> str
"""
Returns the package name of the given module name
"""
if not package:
return ""
lastdot = package.rfind(".")
if lastdot == -1:
return package
return package[:lastdot] | Returns the package name of the given module name | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/endpointdescription.py#L103-L115 |
tcalmant/ipopo | pelix/rsa/endpointdescription.py | encode_osgi_props | def encode_osgi_props(ed):
# type: (EndpointDescription) -> Dict[str, str]
"""
Prepares a dictionary of OSGi properties for the given EndpointDescription
"""
result_props = {}
intfs = ed.get_interfaces()
result_props[OBJECTCLASS] = " ".join(intfs)
for intf in intfs:
pkg_name = pa... | python | def encode_osgi_props(ed):
# type: (EndpointDescription) -> Dict[str, str]
"""
Prepares a dictionary of OSGi properties for the given EndpointDescription
"""
result_props = {}
intfs = ed.get_interfaces()
result_props[OBJECTCLASS] = " ".join(intfs)
for intf in intfs:
pkg_name = pa... | Prepares a dictionary of OSGi properties for the given EndpointDescription | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/endpointdescription.py#L118-L151 |
tcalmant/ipopo | pelix/rsa/endpointdescription.py | decode_list | def decode_list(input_props, name):
# type: (Dict[str, str], str) -> List[str]
"""
Decodes a space-separated list
"""
val_str = input_props.get(name, None)
if val_str:
return val_str.split(" ")
return [] | python | def decode_list(input_props, name):
# type: (Dict[str, str], str) -> List[str]
"""
Decodes a space-separated list
"""
val_str = input_props.get(name, None)
if val_str:
return val_str.split(" ")
return [] | Decodes a space-separated list | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/endpointdescription.py#L154-L162 |
tcalmant/ipopo | pelix/rsa/endpointdescription.py | decode_osgi_props | def decode_osgi_props(input_props):
# type: (Dict[str, Any]) -> Dict[str, Any]
"""
Decodes the OSGi properties of the given endpoint properties
"""
result_props = {}
intfs = decode_list(input_props, OBJECTCLASS)
result_props[OBJECTCLASS] = intfs
for intf in intfs:
package_key = E... | python | def decode_osgi_props(input_props):
# type: (Dict[str, Any]) -> Dict[str, Any]
"""
Decodes the OSGi properties of the given endpoint properties
"""
result_props = {}
intfs = decode_list(input_props, OBJECTCLASS)
result_props[OBJECTCLASS] = intfs
for intf in intfs:
package_key = E... | Decodes the OSGi properties of the given endpoint properties | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/endpointdescription.py#L165-L193 |
tcalmant/ipopo | pelix/rsa/endpointdescription.py | decode_endpoint_props | def decode_endpoint_props(input_props):
# type: (Dict) -> Dict[str, Any]
"""
Decodes the endpoint properties from the given dictionary
"""
ed_props = decode_osgi_props(input_props)
ed_props[ECF_ENDPOINT_CONTAINERID_NAMESPACE] = input_props[
ECF_ENDPOINT_CONTAINERID_NAMESPACE
]
ed... | python | def decode_endpoint_props(input_props):
# type: (Dict) -> Dict[str, Any]
"""
Decodes the endpoint properties from the given dictionary
"""
ed_props = decode_osgi_props(input_props)
ed_props[ECF_ENDPOINT_CONTAINERID_NAMESPACE] = input_props[
ECF_ENDPOINT_CONTAINERID_NAMESPACE
]
ed... | Decodes the endpoint properties from the given dictionary | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/endpointdescription.py#L196-L233 |
tcalmant/ipopo | pelix/rsa/endpointdescription.py | encode_endpoint_props | def encode_endpoint_props(ed):
"""
Encodes the properties of the given EndpointDescription
"""
props = encode_osgi_props(ed)
props[ECF_RSVC_ID] = "{0}".format(ed.get_remoteservice_id()[1])
props[ECF_ENDPOINT_ID] = "{0}".format(ed.get_container_id()[1])
props[ECF_ENDPOINT_CONTAINERID_NAMESPAC... | python | def encode_endpoint_props(ed):
"""
Encodes the properties of the given EndpointDescription
"""
props = encode_osgi_props(ed)
props[ECF_RSVC_ID] = "{0}".format(ed.get_remoteservice_id()[1])
props[ECF_ENDPOINT_ID] = "{0}".format(ed.get_container_id()[1])
props[ECF_ENDPOINT_CONTAINERID_NAMESPAC... | Encodes the properties of the given EndpointDescription | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/endpointdescription.py#L236-L266 |
tcalmant/ipopo | pelix/rsa/endpointdescription.py | EndpointDescription.get_package_version | def get_package_version(self, package):
# type: (str) -> Tuple[int, int, int]
"""
Provides the version of the given package name.
:param package: The name of the package
:return: The version of the specified package as a tuple or (0,0,0)
"""
name = "{0}{1}".forma... | python | def get_package_version(self, package):
# type: (str) -> Tuple[int, int, int]
"""
Provides the version of the given package name.
:param package: The name of the package
:return: The version of the specified package as a tuple or (0,0,0)
"""
name = "{0}{1}".forma... | Provides the version of the given package name.
:param package: The name of the package
:return: The version of the specified package as a tuple or (0,0,0) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/endpointdescription.py#L555-L571 |
tcalmant/ipopo | pelix/rsa/endpointdescription.py | EndpointDescription.is_same_service | def is_same_service(self, endpoint):
# type: (EndpointDescription) -> bool
"""
Tests if this endpoint and the given one have the same framework UUID
and service ID
:param endpoint: Another endpoint
:return: True if both endpoints represent the same remote service
... | python | def is_same_service(self, endpoint):
# type: (EndpointDescription) -> bool
"""
Tests if this endpoint and the given one have the same framework UUID
and service ID
:param endpoint: Another endpoint
:return: True if both endpoints represent the same remote service
... | Tests if this endpoint and the given one have the same framework UUID
and service ID
:param endpoint: Another endpoint
:return: True if both endpoints represent the same remote service | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/endpointdescription.py#L582-L594 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.generate_id | def generate_id(cls, prefix="pelix-"):
"""
Generates a random MQTT client ID
:param prefix: Client ID prefix (truncated to 8 chars)
:return: A client ID of 22 or 23 characters
"""
if not prefix:
# Normalize string
prefix = ""
else:
... | python | def generate_id(cls, prefix="pelix-"):
"""
Generates a random MQTT client ID
:param prefix: Client ID prefix (truncated to 8 chars)
:return: A client ID of 22 or 23 characters
"""
if not prefix:
# Normalize string
prefix = ""
else:
... | Generates a random MQTT client ID
:param prefix: Client ID prefix (truncated to 8 chars)
:return: A client ID of 22 or 23 characters | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L141-L165 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.set_will | def set_will(self, topic, payload, qos=0, retain=False):
"""
Sets up the will message
:param topic: Topic of the will message
:param payload: Content of the message
:param qos: Quality of Service
:param retain: The message will be retained
:raise ValueError: Inva... | python | def set_will(self, topic, payload, qos=0, retain=False):
"""
Sets up the will message
:param topic: Topic of the will message
:param payload: Content of the message
:param qos: Quality of Service
:param retain: The message will be retained
:raise ValueError: Inva... | Sets up the will message
:param topic: Topic of the will message
:param payload: Content of the message
:param qos: Quality of Service
:param retain: The message will be retained
:raise ValueError: Invalid topic
:raise TypeError: Invalid payload | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L194-L205 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.connect | def connect(self, host="localhost", port=1883, keepalive=60):
"""
Connects to the MQTT server. The client will automatically try to
reconnect to this server when the connection is lost.
:param host: MQTT server host
:param port: MQTT server port
:param keepalive: Maximum... | python | def connect(self, host="localhost", port=1883, keepalive=60):
"""
Connects to the MQTT server. The client will automatically try to
reconnect to this server when the connection is lost.
:param host: MQTT server host
:param port: MQTT server port
:param keepalive: Maximum... | Connects to the MQTT server. The client will automatically try to
reconnect to this server when the connection is lost.
:param host: MQTT server host
:param port: MQTT server port
:param keepalive: Maximum period in seconds between communications with
the broke... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L207-L225 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.disconnect | def disconnect(self):
"""
Disconnects from the MQTT server
"""
# Stop the timer
self.__stop_timer()
# Unlock all publishers
for event in self.__in_flight.values():
event.set()
# Disconnect from the server
self.__mqtt.disconnect()
... | python | def disconnect(self):
"""
Disconnects from the MQTT server
"""
# Stop the timer
self.__stop_timer()
# Unlock all publishers
for event in self.__in_flight.values():
event.set()
# Disconnect from the server
self.__mqtt.disconnect()
... | Disconnects from the MQTT server | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L227-L248 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.publish | def publish(self, topic, payload, qos=0, retain=False, wait=False):
"""
Sends a message through the MQTT connection
:param topic: Message topic
:param payload: Message content
:param qos: Quality of Service
:param retain: Retain flag
:param wait: If True, prepare... | python | def publish(self, topic, payload, qos=0, retain=False, wait=False):
"""
Sends a message through the MQTT connection
:param topic: Message topic
:param payload: Message content
:param qos: Quality of Service
:param retain: Retain flag
:param wait: If True, prepare... | Sends a message through the MQTT connection
:param topic: Message topic
:param payload: Message content
:param qos: Quality of Service
:param retain: Retain flag
:param wait: If True, prepares an event to wait for the message to be
published
:return:... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L250-L268 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.__start_timer | def __start_timer(self, delay):
"""
Starts the reconnection timer
:param delay: Delay (in seconds) before calling the reconnection method
"""
self.__timer = threading.Timer(delay, self.__reconnect)
self.__timer.daemon = True
self.__timer.start() | python | def __start_timer(self, delay):
"""
Starts the reconnection timer
:param delay: Delay (in seconds) before calling the reconnection method
"""
self.__timer = threading.Timer(delay, self.__reconnect)
self.__timer.daemon = True
self.__timer.start() | Starts the reconnection timer
:param delay: Delay (in seconds) before calling the reconnection method | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L300-L308 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.__reconnect | def __reconnect(self):
"""
Tries to connect to the MQTT server
"""
# Cancel the timer, if any
self.__stop_timer()
try:
# Try to reconnect the server
result_code = self.__mqtt.reconnect()
if result_code:
# Something wron... | python | def __reconnect(self):
"""
Tries to connect to the MQTT server
"""
# Cancel the timer, if any
self.__stop_timer()
try:
# Try to reconnect the server
result_code = self.__mqtt.reconnect()
if result_code:
# Something wron... | Tries to connect to the MQTT server | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L318-L341 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.__on_connect | def __on_connect(self, client, userdata, flags, result_code):
# pylint: disable=W0613
"""
Client connected to the server
:param client: Connected Paho client
:param userdata: User data (unused)
:param flags: Response flags sent by the broker
:param result_code: C... | python | def __on_connect(self, client, userdata, flags, result_code):
# pylint: disable=W0613
"""
Client connected to the server
:param client: Connected Paho client
:param userdata: User data (unused)
:param flags: Response flags sent by the broker
:param result_code: C... | Client connected to the server
:param client: Connected Paho client
:param userdata: User data (unused)
:param flags: Response flags sent by the broker
:param result_code: Connection result code (0: success, others: error) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L343-L369 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.__on_disconnect | def __on_disconnect(self, client, userdata, result_code):
# pylint: disable=W0613
"""
Client has been disconnected from the server
:param client: Client that received the message
:param userdata: User data (unused)
:param result_code: Disconnection reason (0: expected, 1... | python | def __on_disconnect(self, client, userdata, result_code):
# pylint: disable=W0613
"""
Client has been disconnected from the server
:param client: Client that received the message
:param userdata: User data (unused)
:param result_code: Disconnection reason (0: expected, 1... | Client has been disconnected from the server
:param client: Client that received the message
:param userdata: User data (unused)
:param result_code: Disconnection reason (0: expected, 1: error) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L371-L397 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.__on_message | def __on_message(self, client, userdata, msg):
# pylint: disable=W0613
"""
A message has been received from a server
:param client: Client that received the message
:param userdata: User data (unused)
:param msg: A MQTTMessage bean
"""
# Notify the caller... | python | def __on_message(self, client, userdata, msg):
# pylint: disable=W0613
"""
A message has been received from a server
:param client: Client that received the message
:param userdata: User data (unused)
:param msg: A MQTTMessage bean
"""
# Notify the caller... | A message has been received from a server
:param client: Client that received the message
:param userdata: User data (unused)
:param msg: A MQTTMessage bean | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L399-L413 |
tcalmant/ipopo | pelix/misc/mqtt_client.py | MqttClient.__on_publish | def __on_publish(self, client, userdata, mid):
# pylint: disable=W0613
"""
A message has been published by a server
:param client: Client that received the message
:param userdata: User data (unused)
:param mid: Message ID
"""
try:
self.__in_f... | python | def __on_publish(self, client, userdata, mid):
# pylint: disable=W0613
"""
A message has been published by a server
:param client: Client that received the message
:param userdata: User data (unused)
:param mid: Message ID
"""
try:
self.__in_f... | A message has been published by a server
:param client: Client that received the message
:param userdata: User data (unused)
:param mid: Message ID | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/misc/mqtt_client.py#L415-L427 |
tcalmant/ipopo | pelix/remote/beans.py | to_import_properties | def to_import_properties(properties):
# type: (dict) -> dict
"""
Returns a dictionary where export properties have been replaced by import
ones
:param properties: A dictionary of service properties (with export keys)
:return: A dictionary with import properties
"""
# Copy the given dict... | python | def to_import_properties(properties):
# type: (dict) -> dict
"""
Returns a dictionary where export properties have been replaced by import
ones
:param properties: A dictionary of service properties (with export keys)
:return: A dictionary with import properties
"""
# Copy the given dict... | Returns a dictionary where export properties have been replaced by import
ones
:param properties: A dictionary of service properties (with export keys)
:return: A dictionary with import properties | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L699-L740 |
tcalmant/ipopo | pelix/remote/beans.py | compute_exported_specifications | def compute_exported_specifications(svc_ref):
# type: (pelix.framework.ServiceReference) -> List[str]
"""
Computes the list of specifications exported by the given service
:param svc_ref: A ServiceReference
:return: The list of exported specifications (or an empty list)
"""
if svc_ref.get_p... | python | def compute_exported_specifications(svc_ref):
# type: (pelix.framework.ServiceReference) -> List[str]
"""
Computes the list of specifications exported by the given service
:param svc_ref: A ServiceReference
:return: The list of exported specifications (or an empty list)
"""
if svc_ref.get_p... | Computes the list of specifications exported by the given service
:param svc_ref: A ServiceReference
:return: The list of exported specifications (or an empty list) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L746-L789 |
tcalmant/ipopo | pelix/remote/beans.py | extract_specifications | def extract_specifications(specifications, properties):
# type: (Any[str, List[str]], dict) -> List[str]
"""
Converts "python:/name" specifications to "name". Keeps the other
specifications as is.
:param specifications: The specifications found in a remote registration
:param properties: Servic... | python | def extract_specifications(specifications, properties):
# type: (Any[str, List[str]], dict) -> List[str]
"""
Converts "python:/name" specifications to "name". Keeps the other
specifications as is.
:param specifications: The specifications found in a remote registration
:param properties: Servic... | Converts "python:/name" specifications to "name". Keeps the other
specifications as is.
:param specifications: The specifications found in a remote registration
:param properties: Service properties
:return: The filtered specifications (as a list) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L792-L827 |
tcalmant/ipopo | pelix/remote/beans.py | format_specifications | def format_specifications(specifications):
# type: (Iterable[str]) -> List[str]
"""
Transforms the interfaces names into URI strings, with the interface
implementation language as a scheme.
:param specifications: Specifications to transform
:return: The transformed names
"""
transformed... | python | def format_specifications(specifications):
# type: (Iterable[str]) -> List[str]
"""
Transforms the interfaces names into URI strings, with the interface
implementation language as a scheme.
:param specifications: Specifications to transform
:return: The transformed names
"""
transformed... | Transforms the interfaces names into URI strings, with the interface
implementation language as a scheme.
:param specifications: Specifications to transform
:return: The transformed names | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L830-L848 |
tcalmant/ipopo | pelix/remote/beans.py | _extract_specification_parts | def _extract_specification_parts(specification):
# type: (str) -> Tuple[str, str]
"""
Extract the language and the interface from a "language:/interface"
interface name
:param specification: The formatted interface name
:return: A (language, interface name) tuple
:raise ValueError: Invalid ... | python | def _extract_specification_parts(specification):
# type: (str) -> Tuple[str, str]
"""
Extract the language and the interface from a "language:/interface"
interface name
:param specification: The formatted interface name
:return: A (language, interface name) tuple
:raise ValueError: Invalid ... | Extract the language and the interface from a "language:/interface"
interface name
:param specification: The formatted interface name
:return: A (language, interface name) tuple
:raise ValueError: Invalid specification content | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L851-L880 |
tcalmant/ipopo | pelix/remote/beans.py | ExportEndpoint.get_properties | def get_properties(self):
# type: () -> dict
"""
Returns merged properties
:return: Endpoint merged properties
"""
# Get service properties
properties = self.__reference.get_properties()
# Merge with local properties
properties.update(self.__prop... | python | def get_properties(self):
# type: () -> dict
"""
Returns merged properties
:return: Endpoint merged properties
"""
# Get service properties
properties = self.__reference.get_properties()
# Merge with local properties
properties.update(self.__prop... | Returns merged properties
:return: Endpoint merged properties | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L152-L172 |
tcalmant/ipopo | pelix/remote/beans.py | ExportEndpoint.make_import_properties | def make_import_properties(self):
# type: () -> dict
"""
Returns the properties of this endpoint where export properties have
been replaced by import ones
:return: A dictionary with import properties
"""
# Convert merged properties
props = to_import_prope... | python | def make_import_properties(self):
# type: () -> dict
"""
Returns the properties of this endpoint where export properties have
been replaced by import ones
:return: A dictionary with import properties
"""
# Convert merged properties
props = to_import_prope... | Returns the properties of this endpoint where export properties have
been replaced by import ones
:return: A dictionary with import properties | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L174-L187 |
tcalmant/ipopo | pelix/remote/beans.py | EndpointDescription.__check_properties | def __check_properties(props):
# type: (dict) -> None
"""
Checks that the given dictionary doesn't have export keys and has
import keys
:param props: Properties to validate
:raise ValueError: Invalid properties
"""
# Mandatory properties
mandatory... | python | def __check_properties(props):
# type: (dict) -> None
"""
Checks that the given dictionary doesn't have export keys and has
import keys
:param props: Properties to validate
:raise ValueError: Invalid properties
"""
# Mandatory properties
mandatory... | Checks that the given dictionary doesn't have export keys and has
import keys
:param props: Properties to validate
:raise ValueError: Invalid properties | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L452-L479 |
tcalmant/ipopo | pelix/remote/beans.py | EndpointDescription.get_package_version | def get_package_version(self, package):
# type: (str) -> Tuple[int, ...]
"""
Provides the version of the given package name.
:param package: The name of the package
:return: The version of the specified package as a tuple or (0,0,0)
"""
name = "{0}{1}".format(
... | python | def get_package_version(self, package):
# type: (str) -> Tuple[int, ...]
"""
Provides the version of the given package name.
:param package: The name of the package
:return: The version of the specified package as a tuple or (0,0,0)
"""
name = "{0}{1}".format(
... | Provides the version of the given package name.
:param package: The name of the package
:return: The version of the specified package as a tuple or (0,0,0) | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L548-L567 |
tcalmant/ipopo | pelix/remote/beans.py | EndpointDescription.matches | def matches(self, ldap_filter):
# type: (Any[str, pelix.ldapfilter.LDAPFilter]) -> bool
"""
Tests the properties of this EndpointDescription against the given
filter
:param ldap_filter: A filter
:return: True if properties matches the filter
"""
return pe... | python | def matches(self, ldap_filter):
# type: (Any[str, pelix.ldapfilter.LDAPFilter]) -> bool
"""
Tests the properties of this EndpointDescription against the given
filter
:param ldap_filter: A filter
:return: True if properties matches the filter
"""
return pe... | Tests the properties of this EndpointDescription against the given
filter
:param ldap_filter: A filter
:return: True if properties matches the filter | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L605-L616 |
tcalmant/ipopo | pelix/remote/beans.py | EndpointDescription.to_import | def to_import(self):
# type: () -> ImportEndpoint
"""
Converts an EndpointDescription bean to an ImportEndpoint
:return: An ImportEndpoint bean
"""
# Properties
properties = self.get_properties()
# Framework UUID
fw_uid = self.get_framework_uuid(... | python | def to_import(self):
# type: () -> ImportEndpoint
"""
Converts an EndpointDescription bean to an ImportEndpoint
:return: An ImportEndpoint bean
"""
# Properties
properties = self.get_properties()
# Framework UUID
fw_uid = self.get_framework_uuid(... | Converts an EndpointDescription bean to an ImportEndpoint
:return: An ImportEndpoint bean | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L618-L652 |
tcalmant/ipopo | pelix/remote/beans.py | EndpointDescription.from_export | def from_export(cls, endpoint):
# type: (ExportEndpoint) -> EndpointDescription
"""
Converts an ExportEndpoint bean to an EndpointDescription
:param endpoint: An ExportEndpoint bean
:return: An EndpointDescription bean
"""
assert isinstance(endpoint, ExportEndpoi... | python | def from_export(cls, endpoint):
# type: (ExportEndpoint) -> EndpointDescription
"""
Converts an ExportEndpoint bean to an EndpointDescription
:param endpoint: An ExportEndpoint bean
:return: An EndpointDescription bean
"""
assert isinstance(endpoint, ExportEndpoi... | Converts an ExportEndpoint bean to an EndpointDescription
:param endpoint: An ExportEndpoint bean
:return: An EndpointDescription bean | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/remote/beans.py#L655-L693 |
tcalmant/ipopo | pelix/rsa/edef.py | EDEFReader._parse_description | def _parse_description(self, node):
# type: (ElementTree.Element) -> EndpointDescription
"""
Parse an endpoint description node
:param node: The endpoint description node
:return: The parsed EndpointDescription bean
:raise KeyError: Attribute missing
:raise Value... | python | def _parse_description(self, node):
# type: (ElementTree.Element) -> EndpointDescription
"""
Parse an endpoint description node
:param node: The endpoint description node
:return: The parsed EndpointDescription bean
:raise KeyError: Attribute missing
:raise Value... | Parse an endpoint description node
:param node: The endpoint description node
:return: The parsed EndpointDescription bean
:raise KeyError: Attribute missing
:raise ValueError: Invalid description | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/edef.py#L165-L180 |
tcalmant/ipopo | pelix/rsa/edef.py | EDEFReader._parse_property | def _parse_property(self, node):
# type: (ElementTree.Element) -> Tuple[str, Any]
"""
Parses a property node
:param node: The property node
:return: A (name, value) tuple
:raise KeyError: Attribute missing
"""
# Get information
name = node.attrib[... | python | def _parse_property(self, node):
# type: (ElementTree.Element) -> Tuple[str, Any]
"""
Parses a property node
:param node: The property node
:return: A (name, value) tuple
:raise KeyError: Attribute missing
"""
# Get information
name = node.attrib[... | Parses a property node
:param node: The property node
:return: A (name, value) tuple
:raise KeyError: Attribute missing | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/edef.py#L182-L203 |
tcalmant/ipopo | pelix/rsa/edef.py | EDEFReader._parse_value_node | def _parse_value_node(self, vtype, node):
# type: (str, ElementTree.Element) -> Any
"""
Parses a value node
:param vtype: The value type
:param node: The value node
:return: The parsed value
"""
kind = node.tag
if kind == TAG_XML:
# Ra... | python | def _parse_value_node(self, vtype, node):
# type: (str, ElementTree.Element) -> Any
"""
Parses a value node
:param vtype: The value type
:param node: The value node
:return: The parsed value
"""
kind = node.tag
if kind == TAG_XML:
# Ra... | Parses a value node
:param vtype: The value type
:param node: The value node
:return: The parsed value | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/edef.py#L205-L235 |
tcalmant/ipopo | pelix/rsa/edef.py | EDEFReader.parse | def parse(self, xml_str):
# type: (str) -> List[EndpointDescription]
"""
Parses an EDEF XML string
:param xml_str: An XML string
:return: The list of parsed EndpointDescription
"""
# Parse the document
root = ElementTree.fromstring(xml_str)
if roo... | python | def parse(self, xml_str):
# type: (str) -> List[EndpointDescription]
"""
Parses an EDEF XML string
:param xml_str: An XML string
:return: The list of parsed EndpointDescription
"""
# Parse the document
root = ElementTree.fromstring(xml_str)
if roo... | Parses an EDEF XML string
:param xml_str: An XML string
:return: The list of parsed EndpointDescription | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/edef.py#L237-L254 |
tcalmant/ipopo | pelix/rsa/edef.py | EDEFWriter._make_endpoint | def _make_endpoint(self, root_node, endpoint):
# type: (ElementTree.Element, EndpointDescription) -> None
"""
Converts the given endpoint bean to an XML Element
:param root_node: The XML root Element
:param endpoint: An EndpointDescription bean
"""
endpoint_node ... | python | def _make_endpoint(self, root_node, endpoint):
# type: (ElementTree.Element, EndpointDescription) -> None
"""
Converts the given endpoint bean to an XML Element
:param root_node: The XML root Element
:param endpoint: An EndpointDescription bean
"""
endpoint_node ... | Converts the given endpoint bean to an XML Element
:param root_node: The XML root Element
:param endpoint: An EndpointDescription bean | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/edef.py#L373-L422 |
tcalmant/ipopo | pelix/rsa/edef.py | EDEFWriter._make_xml | def _make_xml(self, endpoints):
# type: (List[EndpointDescription]) -> ElementTree.Element
"""
Converts the given endpoint description beans into an XML Element
:param endpoints: A list of EndpointDescription beans
:return: A string containing an XML document
"""
... | python | def _make_xml(self, endpoints):
# type: (List[EndpointDescription]) -> ElementTree.Element
"""
Converts the given endpoint description beans into an XML Element
:param endpoints: A list of EndpointDescription beans
:return: A string containing an XML document
"""
... | Converts the given endpoint description beans into an XML Element
:param endpoints: A list of EndpointDescription beans
:return: A string containing an XML document | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/edef.py#L424-L438 |
tcalmant/ipopo | pelix/rsa/edef.py | EDEFWriter.to_string | def to_string(self, endpoints):
# type: (List[EndpointDescription]) -> str
"""
Converts the given endpoint description beans into a string
:param endpoints: A list of EndpointDescription beans
:return: A string containing an XML document
"""
# Make the ElementTre... | python | def to_string(self, endpoints):
# type: (List[EndpointDescription]) -> str
"""
Converts the given endpoint description beans into a string
:param endpoints: A list of EndpointDescription beans
:return: A string containing an XML document
"""
# Make the ElementTre... | Converts the given endpoint description beans into a string
:param endpoints: A list of EndpointDescription beans
:return: A string containing an XML document | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/edef.py#L440-L466 |
tcalmant/ipopo | pelix/rsa/edef.py | EDEFWriter.write | def write(self, endpoints, filename):
# type: (List[EndpointDescription], str) -> None
"""
Writes the given endpoint descriptions to the given file
:param endpoints: A list of EndpointDescription beans
:param filename: Name of the file where to write the XML
:raise IOErr... | python | def write(self, endpoints, filename):
# type: (List[EndpointDescription], str) -> None
"""
Writes the given endpoint descriptions to the given file
:param endpoints: A list of EndpointDescription beans
:param filename: Name of the file where to write the XML
:raise IOErr... | Writes the given endpoint descriptions to the given file
:param endpoints: A list of EndpointDescription beans
:param filename: Name of the file where to write the XML
:raise IOError: Error writing the file | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/rsa/edef.py#L468-L478 |
tcalmant/ipopo | pelix/ipopo/decorators.py | is_from_parent | def is_from_parent(cls, attribute_name, value=None):
# type: (type, str, bool) -> bool
"""
Tests if the current attribute value is shared by a parent of the given
class.
Returns None if the attribute value is None.
:param cls: Child class with the requested attribute
:param attribute_name:... | python | def is_from_parent(cls, attribute_name, value=None):
# type: (type, str, bool) -> bool
"""
Tests if the current attribute value is shared by a parent of the given
class.
Returns None if the attribute value is None.
:param cls: Child class with the requested attribute
:param attribute_name:... | Tests if the current attribute value is shared by a parent of the given
class.
Returns None if the attribute value is None.
:param cls: Child class with the requested attribute
:param attribute_name: Name of the attribute to be tested
:param value: The exact value in the child class (optional)
... | https://github.com/tcalmant/ipopo/blob/2f9ae0c44cd9c34ef1a9d50837b3254e75678eb1/pelix/ipopo/decorators.py#L64-L93 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.