crossplane-function-pythonic 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl
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.
- crossplane/pythonic/composite.py +4 -26
- crossplane/pythonic/main.py +8 -8
- {crossplane_function_pythonic-0.1.1.dist-info → crossplane_function_pythonic-0.1.2.dist-info}/METADATA +4 -4
- crossplane_function_pythonic-0.1.2.dist-info/RECORD +11 -0
- crossplane_function_pythonic-0.1.1.dist-info/RECORD +0 -11
- {crossplane_function_pythonic-0.1.1.dist-info → crossplane_function_pythonic-0.1.2.dist-info}/WHEEL +0 -0
- {crossplane_function_pythonic-0.1.1.dist-info → crossplane_function_pythonic-0.1.2.dist-info}/entry_points.txt +0 -0
- {crossplane_function_pythonic-0.1.1.dist-info → crossplane_function_pythonic-0.1.2.dist-info}/licenses/LICENSE +0 -0
crossplane/pythonic/composite.py
CHANGED
@@ -41,7 +41,7 @@ class BaseComposite:
|
|
41
41
|
self.kind = self.observed.kind
|
42
42
|
self.metadata = self.observed.metadata
|
43
43
|
self.spec = self.observed.spec
|
44
|
-
self.status =
|
44
|
+
self.status = self.desired.status
|
45
45
|
self.conditions = Conditions(observed, self.response)
|
46
46
|
self.connection = Connection(observed, desired)
|
47
47
|
self.events = Events(self.response)
|
@@ -217,10 +217,9 @@ class Resource:
|
|
217
217
|
|
218
218
|
@property
|
219
219
|
def externalName(self):
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
return name
|
220
|
+
if 'crossplane.io/external-name' in self.metadata.annotations:
|
221
|
+
return self.metadata.annotations['crossplane.io/external-name']
|
222
|
+
return self.observed.metadata.annotations['crossplane.io/external-name']
|
224
223
|
|
225
224
|
@externalName.setter
|
226
225
|
def externalName(self, name):
|
@@ -409,27 +408,6 @@ class RequiredResource:
|
|
409
408
|
return bool(self.observed)
|
410
409
|
|
411
410
|
|
412
|
-
class Status:
|
413
|
-
def __init__(self, observed, desired):
|
414
|
-
self.__dict__['_observed'] = observed
|
415
|
-
self.__dict__['_desired'] = desired
|
416
|
-
|
417
|
-
def __getattr__(self, key):
|
418
|
-
return self[key]
|
419
|
-
|
420
|
-
def __getitem__(self, key):
|
421
|
-
value = self._desired[key]
|
422
|
-
if value is None:
|
423
|
-
value = self._observed[key]
|
424
|
-
return value
|
425
|
-
|
426
|
-
def __setattr__(self, key, value):
|
427
|
-
self[key] = value
|
428
|
-
|
429
|
-
def __setitem__(self, key, value):
|
430
|
-
self._desired[key] = value
|
431
|
-
|
432
|
-
|
433
411
|
class Conditions:
|
434
412
|
def __init__(self, observed, response=None):
|
435
413
|
self._observed = observed
|
crossplane/pythonic/main.py
CHANGED
@@ -102,13 +102,6 @@ class Main:
|
|
102
102
|
print('Either --tls-certs-dir or --insecure must be specified', file=sys.stderr)
|
103
103
|
sys.exit(1)
|
104
104
|
|
105
|
-
self.configure_logging(args)
|
106
|
-
# enables read only volumes or mismatched uid volumes
|
107
|
-
sys.dont_write_bytecode = True
|
108
|
-
await self.run(args)
|
109
|
-
|
110
|
-
# Allow for independent running of function-pythonic
|
111
|
-
async def run(self, args):
|
112
105
|
if args.pip_install:
|
113
106
|
import pip._internal.cli.main
|
114
107
|
pip._internal.cli.main.main(['install', '--user', *shlex.split(args.pip_install)])
|
@@ -116,6 +109,13 @@ class Main:
|
|
116
109
|
for path in reversed(args.python_path):
|
117
110
|
sys.path.insert(0, str(pathlib.Path(path).expanduser().resolve()))
|
118
111
|
|
112
|
+
self.configure_logging(args)
|
113
|
+
# enables read only volumes or mismatched uid volumes
|
114
|
+
sys.dont_write_bytecode = True
|
115
|
+
await self.run(args)
|
116
|
+
|
117
|
+
# Allow for independent running of function-pythonic
|
118
|
+
async def run(self, args):
|
119
119
|
if args.allow_oversize_protos:
|
120
120
|
from google.protobuf.internal import api_implementation
|
121
121
|
if api_implementation._c_module:
|
@@ -166,7 +166,7 @@ class Main:
|
|
166
166
|
handler = logging.StreamHandler()
|
167
167
|
handler.setFormatter(formatter)
|
168
168
|
logger = logging.getLogger()
|
169
|
-
logger.
|
169
|
+
logger.handlers = [handler]
|
170
170
|
logger.setLevel(logging.DEBUG if args.debug else logging.INFO)
|
171
171
|
|
172
172
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: crossplane-function-pythonic
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: A Python centric Crossplane Function
|
5
5
|
Project-URL: Documentation, https://github.com/fortra/function-pythonic#readme
|
6
6
|
Project-URL: Issues, https://github.com/fortra/function-pythonic/issues
|
@@ -81,7 +81,7 @@ kind: Function
|
|
81
81
|
metadata:
|
82
82
|
name: function-pythonic
|
83
83
|
spec:
|
84
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
84
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.2
|
85
85
|
```
|
86
86
|
## Composed Resource Dependencies
|
87
87
|
|
@@ -408,7 +408,7 @@ metadata:
|
|
408
408
|
annotations:
|
409
409
|
render.crossplane.io/runtime: Development
|
410
410
|
spec:
|
411
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
411
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.2
|
412
412
|
```
|
413
413
|
In one terminal session, run function-pythonic:
|
414
414
|
```shell
|
@@ -510,7 +510,7 @@ kind: Function
|
|
510
510
|
metadata:
|
511
511
|
name: function-pythonic
|
512
512
|
spec:
|
513
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
513
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.2
|
514
514
|
runtimeConfigRef:
|
515
515
|
name: function-pythonic
|
516
516
|
---
|
@@ -0,0 +1,11 @@
|
|
1
|
+
crossplane/pythonic/__init__.py,sha256=A9U4-azc4DjSsOnOnjQxCkoTzsZMRBb_AvqzR_Bd95A,268
|
2
|
+
crossplane/pythonic/composite.py,sha256=2NRqs98GL6jLmb4wYoHktj77UTJUpPhicK9D8f_07_0,21101
|
3
|
+
crossplane/pythonic/function.py,sha256=2O_SNoqlSNxU2dPy9h_khk7tuSdniOmksqajeWPCK8M,16435
|
4
|
+
crossplane/pythonic/main.py,sha256=fkMk2WDdPpRQQe-wFcI-2P3f64ddsftzx91cHaT5rII,6894
|
5
|
+
crossplane/pythonic/packages.py,sha256=4TxyT6V79R0m4tJbC8R1gwU_vgHGLXKSBzeTTKd8xGo,5120
|
6
|
+
crossplane/pythonic/protobuf.py,sha256=DD8feo5Ni8phNq7mKlAXfJ2lLvkb-S_fAq9J9DD-Y98,47703
|
7
|
+
crossplane_function_pythonic-0.1.2.dist-info/METADATA,sha256=OsOgAPEws5ZcJhLsWose7t2NItPW59Ohf_IXi3ucGuY,24432
|
8
|
+
crossplane_function_pythonic-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
+
crossplane_function_pythonic-0.1.2.dist-info/entry_points.txt,sha256=jJ4baywFDviB9WyAhyhNYF2VOCb6XtbRSjKf7bnBwhg,68
|
10
|
+
crossplane_function_pythonic-0.1.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
11
|
+
crossplane_function_pythonic-0.1.2.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
crossplane/pythonic/__init__.py,sha256=A9U4-azc4DjSsOnOnjQxCkoTzsZMRBb_AvqzR_Bd95A,268
|
2
|
-
crossplane/pythonic/composite.py,sha256=O9NLmmZzf1DqjuGRcOLDZQuLL5oZQTXZ5h_YtKdqiqg,21608
|
3
|
-
crossplane/pythonic/function.py,sha256=2O_SNoqlSNxU2dPy9h_khk7tuSdniOmksqajeWPCK8M,16435
|
4
|
-
crossplane/pythonic/main.py,sha256=HILfW6WP-QvOiyfLLu41bAN_2hbkxuw-3DD8rEUMTPQ,6893
|
5
|
-
crossplane/pythonic/packages.py,sha256=4TxyT6V79R0m4tJbC8R1gwU_vgHGLXKSBzeTTKd8xGo,5120
|
6
|
-
crossplane/pythonic/protobuf.py,sha256=DD8feo5Ni8phNq7mKlAXfJ2lLvkb-S_fAq9J9DD-Y98,47703
|
7
|
-
crossplane_function_pythonic-0.1.1.dist-info/METADATA,sha256=rUaOIYfdkBYrIiCY6OSaWN8NnQy6iA2uip6F8YVjMBY,24432
|
8
|
-
crossplane_function_pythonic-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
-
crossplane_function_pythonic-0.1.1.dist-info/entry_points.txt,sha256=jJ4baywFDviB9WyAhyhNYF2VOCb6XtbRSjKf7bnBwhg,68
|
10
|
-
crossplane_function_pythonic-0.1.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
11
|
-
crossplane_function_pythonic-0.1.1.dist-info/RECORD,,
|
{crossplane_function_pythonic-0.1.1.dist-info → crossplane_function_pythonic-0.1.2.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|