bisos.tocsModules 0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bisos_tocsmodules-0.1/PKG-INFO +380 -0
- bisos_tocsmodules-0.1/README.rst +348 -0
- bisos_tocsmodules-0.1/_description.org +267 -0
- bisos_tocsmodules-0.1/bin/facterModule.cs +242 -0
- bisos_tocsmodules-0.1/bin/facterModuleSample.py +38 -0
- bisos_tocsmodules-0.1/bin/seeded-facterModule.cs +36 -0
- bisos_tocsmodules-0.1/bisos/__init__.py +1 -0
- bisos_tocsmodules-0.1/bisos/tocsModules/__init__.py +0 -0
- bisos_tocsmodules-0.1/bisos/tocsModules/facterModule_csu.py +459 -0
- bisos_tocsmodules-0.1/bisos/tocsModules/facterModule_seed.py +116 -0
- bisos_tocsmodules-0.1/bisos/tocsModules/loader_facter.py +285 -0
- bisos_tocsmodules-0.1/bisos.tocsModules.egg-info/PKG-INFO +380 -0
- bisos_tocsmodules-0.1/bisos.tocsModules.egg-info/SOURCES.txt +19 -0
- bisos_tocsmodules-0.1/bisos.tocsModules.egg-info/dependency_links.txt +1 -0
- bisos_tocsmodules-0.1/bisos.tocsModules.egg-info/not-zip-safe +1 -0
- bisos_tocsmodules-0.1/bisos.tocsModules.egg-info/requires.txt +6 -0
- bisos_tocsmodules-0.1/bisos.tocsModules.egg-info/top_level.txt +1 -0
- bisos_tocsmodules-0.1/lh-agpl3-LICENSE.txt +679 -0
- bisos_tocsmodules-0.1/pyproject.toml +8 -0
- bisos_tocsmodules-0.1/setup.cfg +4 -0
- bisos_tocsmodules-0.1/setup.py +113 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: bisos.tocsModules
|
|
3
|
+
Version: 0.1
|
|
4
|
+
Summary: bisos.facter: Adoption and adaptation of facter to Python and as Command-Services
|
|
5
|
+
Author: Mohsen Banan
|
|
6
|
+
Author-email: libre@mohsen.1.banan.byname.net
|
|
7
|
+
Maintainer: Mohsen Banan
|
|
8
|
+
Maintainer-email: libre@mohsen.1.banan.byname.net
|
|
9
|
+
License: AGPL
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
+
Classifier: Operating System :: POSIX
|
|
14
|
+
Classifier: Programming Language :: Python
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
+
Requires-Dist: bisos
|
|
18
|
+
Requires-Dist: bisos.b
|
|
19
|
+
Requires-Dist: bisos.common
|
|
20
|
+
Requires-Dist: bisos.csPlayer
|
|
21
|
+
Requires-Dist: bisos.loadAsCs
|
|
22
|
+
Requires-Dist: setuptools==75.8.0
|
|
23
|
+
Dynamic: author
|
|
24
|
+
Dynamic: author-email
|
|
25
|
+
Dynamic: classifier
|
|
26
|
+
Dynamic: description
|
|
27
|
+
Dynamic: license
|
|
28
|
+
Dynamic: maintainer
|
|
29
|
+
Dynamic: maintainer-email
|
|
30
|
+
Dynamic: requires-dist
|
|
31
|
+
Dynamic: summary
|
|
32
|
+
|
|
33
|
+
=================================================================================
|
|
34
|
+
bisos.facter: Adoption and adaptation of facter to Python and as Command-Services
|
|
35
|
+
=================================================================================
|
|
36
|
+
|
|
37
|
+
.. contents::
|
|
38
|
+
:depth: 3
|
|
39
|
+
..
|
|
40
|
+
|
|
41
|
+
Overview
|
|
42
|
+
========
|
|
43
|
+
|
|
44
|
+
*bisos.facter* provides access to facter information through python.
|
|
45
|
+
|
|
46
|
+
bisos.facter is a python package that uses the
|
|
47
|
+
`PyCS-Framework <https://github.com/bisos-pip/pycs>`__ for adoption and
|
|
48
|
+
adaptation of **facter** to python and PyCS-Framework. It is a
|
|
49
|
+
BISOS-Capability and a Standalone-BISOS-Package.
|
|
50
|
+
|
|
51
|
+
*bisos.facter* is based on the
|
|
52
|
+
`PyCS-Foundation <https://github.com/bisos-pip/b>`__ and can be used
|
|
53
|
+
both as a Command and as a Service (invoke/perform model of remote
|
|
54
|
+
operations using `RPyC <https://github.com/tomerfiliba-org/rpyc>`__).
|
|
55
|
+
Use of bisos.facter as a service, can facilitate central management of
|
|
56
|
+
multiple systems.
|
|
57
|
+
|
|
58
|
+
Package Documentation At Github
|
|
59
|
+
===============================
|
|
60
|
+
|
|
61
|
+
The information below is a subset of the full of documentation for this
|
|
62
|
+
bisos-pip package. More complete documentation is available at:
|
|
63
|
+
https://github.com/bisos-pip/capability-cs
|
|
64
|
+
|
|
65
|
+
.. _table-of-contents:
|
|
66
|
+
|
|
67
|
+
Table of Contents TOC
|
|
68
|
+
=====================
|
|
69
|
+
|
|
70
|
+
- `Overview <#overview>`__
|
|
71
|
+
- `Package Documentation At
|
|
72
|
+
Github <#package-documentation-at-github>`__
|
|
73
|
+
- `About facter <#about-facter>`__
|
|
74
|
+
- `Part of BISOS — ByStar Internet Services Operating
|
|
75
|
+
System <#part-of-bisos-----bystar-internet-services-operating-system>`__
|
|
76
|
+
- `bisos.facter is a Command-Services PyCS
|
|
77
|
+
Facility <#bisosfacter-is-a-command-services-pycs-facility>`__
|
|
78
|
+
- `bisos.facter as a Standalone Piece of
|
|
79
|
+
BISOS <#bisosfacter-as-a-standalone-piece-of-bisos>`__
|
|
80
|
+
- `Installation <#installation>`__
|
|
81
|
+
|
|
82
|
+
- `Installation With pip <#installation-with-pip>`__
|
|
83
|
+
- `Installation With pipx <#installation-with-pipx>`__
|
|
84
|
+
- `Post Installation Basic
|
|
85
|
+
Testing <#post-installation-basic-testing>`__
|
|
86
|
+
|
|
87
|
+
- `Usage <#usage>`__
|
|
88
|
+
|
|
89
|
+
- `Local Usage (system
|
|
90
|
+
command-line) <#local-usage-system-command-line>`__
|
|
91
|
+
- `Remote Usage (as a service –
|
|
92
|
+
Performer+Invoker) <#remote-usage-as-a-service----performerinvoker>`__
|
|
93
|
+
|
|
94
|
+
- `Performer <#performer>`__
|
|
95
|
+
- `Invoker <#invoker>`__
|
|
96
|
+
|
|
97
|
+
- `Use by python script <#use-by-python-script>`__
|
|
98
|
+
|
|
99
|
+
- `bisos.facter as an Example of Command Services (PyCS) – Code
|
|
100
|
+
Walkthrough <#bisosfacter-as-an-example-of-command-services-pycs----code-walkthrough>`__
|
|
101
|
+
|
|
102
|
+
- `./bin/facter.cs (./bin/facter-roPerf.cs
|
|
103
|
+
./bin/facter-roInv.cs) <#py3binfactercs--binfacter-roperfcs--binfacter-roinvcs>`__
|
|
104
|
+
- `./bisos/facter/facter.py (COMEEGA
|
|
105
|
+
Python) <#py3bisosfacterfacterpy-comeega-python>`__
|
|
106
|
+
- `./bisos/facter/facter\ conv.py (Conventional
|
|
107
|
+
Python) <#py3bisosfacterfacter_convpy-conventional-python>`__
|
|
108
|
+
- `./bisos/facter/facter\ csu.py <#py3bisosfacterfacter_csupy>`__
|
|
109
|
+
- `PyPi and Github Packaging <#pypi-and-github-packaging>`__
|
|
110
|
+
|
|
111
|
+
- `Documentation and Blee-Panels <#documentation-and-blee-panels>`__
|
|
112
|
+
|
|
113
|
+
- `bisos.facter Blee-Panels <#bisosfacter-blee-panels>`__
|
|
114
|
+
|
|
115
|
+
- `Support <#support>`__
|
|
116
|
+
- `Planned Improvements <#planned-improvements>`__
|
|
117
|
+
|
|
118
|
+
About facter
|
|
119
|
+
============
|
|
120
|
+
|
|
121
|
+
`Facter <https://www.puppet.com/docs/puppet/7/facter.html>`__ is part of
|
|
122
|
+
`puppet <https://www.puppet.com/>`__, but it can also be used without
|
|
123
|
+
puppet. Facter gathers information about the system as sets of
|
|
124
|
+
hierarchical variables.
|
|
125
|
+
|
|
126
|
+
To install facter:
|
|
127
|
+
|
|
128
|
+
.. code:: bash
|
|
129
|
+
|
|
130
|
+
sudo apt-get install -y facter
|
|
131
|
+
|
|
132
|
+
Facter is a ruby package. This bisos.facter python package provides
|
|
133
|
+
access to facter information through python both locally and remotely.
|
|
134
|
+
|
|
135
|
+
Part of BISOS — ByStar Internet Services Operating System
|
|
136
|
+
=========================================================
|
|
137
|
+
|
|
138
|
+
| Layered on top of Debian, **BISOS**: (By\* Internet Services Operating
|
|
139
|
+
System) is a unified and universal framework for developing both
|
|
140
|
+
internet services and software-service continuums that use internet
|
|
141
|
+
services. See `Bootstrapping ByStar, BISOS and
|
|
142
|
+
Blee <https://github.com/bxGenesis/start>`__ for information about
|
|
143
|
+
getting started with BISOS.
|
|
144
|
+
| **BISOS** is a foundation for **The Libre-Halaal ByStar Digital
|
|
145
|
+
Ecosystem** which is described as a cure for losses of autonomy and
|
|
146
|
+
privacy in a book titled: `Nature of
|
|
147
|
+
Polyexistentials <https://github.com/bxplpc/120033>`__
|
|
148
|
+
|
|
149
|
+
*bisos.facter* is part of BISOS. Within BISOS, bisos.cmdb uses
|
|
150
|
+
bisos.facter for Configuration Management DataBase purposes.
|
|
151
|
+
|
|
152
|
+
bisos.facter is a Command-Services PyCS Facility
|
|
153
|
+
================================================
|
|
154
|
+
|
|
155
|
+
bisos.facter can be used locally on command-line or remotely as a
|
|
156
|
+
service. bisos.facter is a PyCS multi-unit command-service. PyCS is a
|
|
157
|
+
framework that converges development of CLI and Services. PyCS is an
|
|
158
|
+
alternative to FastAPI, Typer and Click.
|
|
159
|
+
|
|
160
|
+
bisos.facter uses the PyCS-Framework to:
|
|
161
|
+
|
|
162
|
+
#. Provide access to facter facilities through native python.
|
|
163
|
+
#. Provide local access to facter facilities on CLI.
|
|
164
|
+
#. Provide remote access to facter facilities through remote invocation
|
|
165
|
+
of python Expectation Complete Operations using
|
|
166
|
+
`rpyc <https://github.com/tomerfiliba-org/rpyc>`__.
|
|
167
|
+
#. Provide remote access to facter facilities on CLI.
|
|
168
|
+
|
|
169
|
+
What is unique in the PyCS-Framework is that these four models are all a
|
|
170
|
+
single abstraction.
|
|
171
|
+
|
|
172
|
+
The core of PyCS-Framework is the *bisos.b* package (the
|
|
173
|
+
PyCS-Foundation). See https://github.com/bisos-pip/b for an overview.
|
|
174
|
+
|
|
175
|
+
bisos.facter as a Standalone Piece of BISOS
|
|
176
|
+
===========================================
|
|
177
|
+
|
|
178
|
+
bisos.facter is a standalone piece of BISOS. It can be used as a
|
|
179
|
+
self-contained Python package separate from BISOS. Follow the
|
|
180
|
+
installation and usage instructions below for your own use.
|
|
181
|
+
|
|
182
|
+
Installation
|
|
183
|
+
============
|
|
184
|
+
|
|
185
|
+
The sources for the bisos.facter pip package are maintained at:
|
|
186
|
+
https://github.com/bisos-pip/facter.
|
|
187
|
+
|
|
188
|
+
The bisos.facter pip package is available at PYPI as
|
|
189
|
+
https://pypi.org/project/bisos.facter
|
|
190
|
+
|
|
191
|
+
You can install bisos.facter with pip or pipx.
|
|
192
|
+
|
|
193
|
+
Installation With pip
|
|
194
|
+
---------------------
|
|
195
|
+
|
|
196
|
+
If you need access to bisos.facter as a python module, you can install
|
|
197
|
+
it with pip:
|
|
198
|
+
|
|
199
|
+
.. code:: bash
|
|
200
|
+
|
|
201
|
+
pip install bisos.facter
|
|
202
|
+
|
|
203
|
+
Installation With pipx
|
|
204
|
+
----------------------
|
|
205
|
+
|
|
206
|
+
If you only need access to bisos.facter on command-line, you can install
|
|
207
|
+
it with pipx:
|
|
208
|
+
|
|
209
|
+
.. code:: bash
|
|
210
|
+
|
|
211
|
+
pipx install bisos.facter
|
|
212
|
+
|
|
213
|
+
The following commands are made available:
|
|
214
|
+
|
|
215
|
+
- facter.cs
|
|
216
|
+
- facter-roInv.cs
|
|
217
|
+
- facter-roPerf.cs
|
|
218
|
+
|
|
219
|
+
These are all one file with 3 names. *facter-roInv.cs* and
|
|
220
|
+
*facter-roPerf.cs* are sym-links to *facter.cs*
|
|
221
|
+
|
|
222
|
+
Post Installation Basic Testing
|
|
223
|
+
-------------------------------
|
|
224
|
+
|
|
225
|
+
After the installation, run some basic tests:
|
|
226
|
+
|
|
227
|
+
.. code:: bash
|
|
228
|
+
|
|
229
|
+
facter.cs
|
|
230
|
+
facter networking.interfaces.lo.bindings
|
|
231
|
+
|
|
232
|
+
Usage
|
|
233
|
+
=====
|
|
234
|
+
|
|
235
|
+
Local Usage (system command-line)
|
|
236
|
+
---------------------------------
|
|
237
|
+
|
|
238
|
+
``facter.cs`` does the equivalent of facter.
|
|
239
|
+
|
|
240
|
+
.. code:: bash
|
|
241
|
+
|
|
242
|
+
bin/facter.cs
|
|
243
|
+
|
|
244
|
+
Remote Usage (as a service – Performer+Invoker)
|
|
245
|
+
-----------------------------------------------
|
|
246
|
+
|
|
247
|
+
You can also run:
|
|
248
|
+
|
|
249
|
+
Performer
|
|
250
|
+
~~~~~~~~~
|
|
251
|
+
|
|
252
|
+
Invoke performer as:
|
|
253
|
+
|
|
254
|
+
.. code:: bash
|
|
255
|
+
|
|
256
|
+
bin/facter-roPerf.cs
|
|
257
|
+
|
|
258
|
+
Invoker
|
|
259
|
+
~~~~~~~
|
|
260
|
+
|
|
261
|
+
.. code:: bash
|
|
262
|
+
|
|
263
|
+
bin/facter-roInv.cs
|
|
264
|
+
|
|
265
|
+
Use by python script
|
|
266
|
+
--------------------
|
|
267
|
+
|
|
268
|
+
bisos.facter Source Code is in written in COMEEGA (Collaborative
|
|
269
|
+
Org-Mode Enhanced Emacs Generalized Authorship) –
|
|
270
|
+
https://github.com/bx-blee/comeega.
|
|
271
|
+
|
|
272
|
+
The primary API for bisos.facter is
|
|
273
|
+
`file:./bisos/facter/facter_csu.py <./bisos/facter/facter_csu.py>`__. It
|
|
274
|
+
is self documented in COMEEGA.
|
|
275
|
+
|
|
276
|
+
bisos.facter as an Example of Command Services (PyCS) – Code Walkthrough
|
|
277
|
+
========================================================================
|
|
278
|
+
|
|
279
|
+
An overview of the relevant files of the bisos.facter package is
|
|
280
|
+
provided below.
|
|
281
|
+
|
|
282
|
+
./bin/facter.cs (./bin/facter-roPerf.cs ./bin/facter-roInv.cs)
|
|
283
|
+
--------------------------------------------------------------
|
|
284
|
+
|
|
285
|
+
The file `file:./bin/facter.cs <./bin/facter.cs>`__ is a CS-MU
|
|
286
|
+
(Command-Services Multi-Unit). It is fundamentally a boiler plate that
|
|
287
|
+
has the main framework org-mode Dynamic Block and which imports its
|
|
288
|
+
commands from bisos.facter.facter\ :sub:`csu` and
|
|
289
|
+
bisos.banna.bannaPortNu modules.
|
|
290
|
+
|
|
291
|
+
./bisos/facter/facter.py (COMEEGA Python)
|
|
292
|
+
-----------------------------------------
|
|
293
|
+
|
|
294
|
+
The file `file:./bisos/facter/facter.py <./bisos/facter/facter.py>`__
|
|
295
|
+
includes functions that run a sub-process with "facter –json", obtain
|
|
296
|
+
the json result as a collection of namedtuples. This can then be
|
|
297
|
+
subjected to caching and then retrieved based on string representations
|
|
298
|
+
mapping to namedtuples.
|
|
299
|
+
|
|
300
|
+
./bisos/facter/facter\ :sub:`conv`.py (Conventional Python)
|
|
301
|
+
-----------------------------------------------------------
|
|
302
|
+
|
|
303
|
+
The file
|
|
304
|
+
`file:./bisos/facter/facter_conv.py <./bisos/facter/facter_conv.py>`__
|
|
305
|
+
is same as `file:./bisos/facter/facter.py <./bisos/facter/facter.py>`__
|
|
306
|
+
without use of COMEEGA. Without Emacs, it is not easy to read the
|
|
307
|
+
COMEEGA files and some people prefer not to use or know about COMEEGA.
|
|
308
|
+
In such situations facter\ :sub:`conv`.py can be considered as
|
|
309
|
+
conventional sample code.
|
|
310
|
+
|
|
311
|
+
./bisos/facter/facter\ :sub:`csu`.py
|
|
312
|
+
------------------------------------
|
|
313
|
+
|
|
314
|
+
The file
|
|
315
|
+
`file:./bisos/facter/facter_csu.py <./bisos/facter/facter_csu.py>`__ is
|
|
316
|
+
a CS-U (Command-Services Unit). It includes definitions of commands and
|
|
317
|
+
their CLI params and args.
|
|
318
|
+
|
|
319
|
+
Implementation of commands in facter\ :sub:`csu`.py rely on facilities
|
|
320
|
+
provided in facter.py.
|
|
321
|
+
|
|
322
|
+
PyPi and Github Packaging
|
|
323
|
+
-------------------------
|
|
324
|
+
|
|
325
|
+
All bisos-pip repos in the https://github.com/bisos-pip github
|
|
326
|
+
organization follow the same structure. They all have
|
|
327
|
+
`file:./setup.py <./setup.py>`__ files that are driven by
|
|
328
|
+
`file:./pypiProc.sh <./pypiProc.sh>`__.
|
|
329
|
+
|
|
330
|
+
The `file:./setup.py <./setup.py>`__ file is a series of consistent
|
|
331
|
+
org-mode Dynamic Block that automatically determine the module name and
|
|
332
|
+
the installed and pypi revisions.
|
|
333
|
+
|
|
334
|
+
The `file:./pypiProc.sh <./pypiProc.sh>`__ uses setup.py and pushes to
|
|
335
|
+
pypi when desired and allows for isolated testing using pipx.
|
|
336
|
+
|
|
337
|
+
Documentation and Blee-Panels
|
|
338
|
+
=============================
|
|
339
|
+
|
|
340
|
+
bisos.facter is part of ByStar Digital Ecosystem http://www.by-star.net.
|
|
341
|
+
|
|
342
|
+
This module's primary documentation is in the form of Blee-Panels.
|
|
343
|
+
Additional information is also available in:
|
|
344
|
+
http://www.by-star.net/PLPC/180047
|
|
345
|
+
|
|
346
|
+
bisos.facter Blee-Panels
|
|
347
|
+
------------------------
|
|
348
|
+
|
|
349
|
+
bisos.facter Blee-Panles are in ./panels directory. From within Blee and
|
|
350
|
+
BISOS these panles are accessible under the Blee "Panels" menu.
|
|
351
|
+
|
|
352
|
+
See
|
|
353
|
+
`file:./panels/_nodeBase_/fullUsagePanel-en.org <./panels/_nodeBase_/fullUsagePanel-en.org>`__
|
|
354
|
+
for a starting point.
|
|
355
|
+
|
|
356
|
+
Support
|
|
357
|
+
=======
|
|
358
|
+
|
|
359
|
+
| For support, criticism, comments and questions; please contact the
|
|
360
|
+
author/maintainer
|
|
361
|
+
| `Mohsen Banan <http://mohsen.1.banan.byname.net>`__ at:
|
|
362
|
+
http://mohsen.1.banan.byname.net/contact
|
|
363
|
+
|
|
364
|
+
Planned Improvements
|
|
365
|
+
====================
|
|
366
|
+
|
|
367
|
+
One material use of bisos.facter is to facilitate developement of an
|
|
368
|
+
automated Configuration Management DataBase (CMDB) as a centralized
|
|
369
|
+
facility that organizes information about system, including the
|
|
370
|
+
relationships between hardware, software, and networks. On a per-system
|
|
371
|
+
base, bisos.facter can obtain much of that information and through PyCS
|
|
372
|
+
it can deliver that information remotely to centralized CMDBs. In this
|
|
373
|
+
context CMDBs generally function as invokers and we need to facilitate
|
|
374
|
+
ever present bisos.facter performers.
|
|
375
|
+
|
|
376
|
+
The CMDB invoker part is implemented as bisos.cmdb.
|
|
377
|
+
|
|
378
|
+
Each BISOS platform needs to run an instance under systemd. I have done
|
|
379
|
+
something similar to this for bisos.marmee. That piece need to be
|
|
380
|
+
absorbed.
|