Covers all datastore related examples
(l2)
| 813 | |
| 814 | |
| 815 | def generate_datastore_examples(l2): |
| 816 | """Covers all datastore related examples""" |
| 817 | try: |
| 818 | logger.info('Datastore Start...') |
| 819 | l2.rpc.datastore(key='somekey', hex='61', mode='create-or-append') |
| 820 | l2.rpc.datastore(key=['test', 'name'], string='saving data to the store', mode='must-create') |
| 821 | update_example(node=l2, method='datastore', params={'key': ['employee', 'index'], 'string': 'saving employee keys to the store', 'mode': 'must-create'}) |
| 822 | update_example(node=l2, method='datastore', params={'key': 'otherkey', 'string': 'other', 'mode': 'must-create'}) |
| 823 | update_example(node=l2, method='datastore', params={'key': 'otherkey', 'string': ' key: text to be appended to the otherkey', 'mode': 'must-append', 'generation': 0}) |
| 824 | update_example(node=l2, method='datastoreusage', params={}) |
| 825 | update_example(node=l2, method='datastoreusage', params={'key': ['test', 'name']}) |
| 826 | update_example(node=l2, method='datastoreusage', params={'key': 'otherkey'}) |
| 827 | update_example(node=l2, method='deldatastore', params={'key': ['test', 'name']}) |
| 828 | update_example(node=l2, method='deldatastore', params={'key': 'otherkey', 'generation': 1}) |
| 829 | logger.info('Datastore Done!') |
| 830 | except Exception as e: |
| 831 | logger.error(f'Error in generating datastore examples: {e}') |
| 832 | raise |
| 833 | |
| 834 | |
| 835 | def generate_bookkeeper_examples(l2, l3, c23_2_chan_id): |