def add_embedded_osi(self, e_osi, sync=True):
        """
        add an embedded OS instance to this OS instance.
        :param e_osi: the embedded OS instance to add on this OS instance
        :param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
        add the embedded OS instance object on list to be added on next save().
        :return:
        """
        LOGGER.debug("OSInstance.add_embedded_osi")
        if not sync:
            self.embedded_osi_2_add.append(e_osi)
        else:
            if e_osi.id is None:
                e_osi.save()
            if self.id is not None and e_osi.id is not None:
                params = {
                    'id': self.id,
                    'osiID': e_osi.id
                }
                args = {'http_operation': 'GET', 'operation_path': 'update/embeddedOSInstances/add',
                        'parameters': params}
                response = OSInstanceService.requester.call(args)
                if response.rc != 0:
                    LOGGER.warning(
                        'OSInstance.add_embedded_osi - Problem while updating OS instance ' + self.name +
                        '. Reason: ' + str(response.response_content) + '-' + str(response.error_message) +
                        " (" + str(response.rc) + ")"
                    )
                else:
                    self.embedded_osi_ids.append(e_osi.id)
                    e_osi.sync()
            else:
                LOGGER.warning(
                    'OSInstance.add_embedded_osi - Problem while updating OS instance ' + self.name +
                    '. Reason: embedded OS instance ' + e_osi.name + ' id is None'
                )
add an embedded OS instance to this OS instance.
        :param e_osi: the embedded OS instance to add on this OS instance
        :param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
        add the embedded OS instance object on list to be added on next save().
        :return: