This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dn: ou=groups,dc=larkintuckerllc,dc=com | |
objectClass: organizationalUnit | |
ou: groups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dn: ou=people,dc=larkintuckerllc,dc=com | |
objectClass: organizationalUnit | |
ou: people |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: debug | |
namespace: default | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: hdac | |
spec: | |
ports: | |
- port: 443 | |
protocol: TCP | |
targetPort: 8443 | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_metadata(self, items: Sequence[str]) -> Optional[Dict[str, MetadataItem]]: # noqa: E501 | |
metadata: Dict[str, MetadataItem] = {} | |
for item in items: | |
if item in self.metadata: | |
metadata[item] = self.metadata[item] | |
if metadata == {}: | |
return None | |
return metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Dict, Sequence | |
class MetadataItem: | |
key: str | |
value: str | |
def __init__(self, key: str, value: str): | |
self.key = key | |
self.value = value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Dict | |
from typed.resource import MetadataItem, Resource | |
def has_name(metadata: Dict[str, MetadataItem]) -> bool: | |
return 'name' in metadata | |
def run() -> None: | |
resource = Resource( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_metadata(self, items): | |
metadata = {} | |
for item in items: | |
if item in self.metadata: | |
metadata[item] = self.metadata[item] | |
if metadata == {}: | |
return None | |
return metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from untyped.resource import MetadataItem, Resource | |
def has_name(metadata): | |
return 'name' in metadata | |
def run(): | |
resource = Resource( | |
b'000', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MetadataItem: | |
def __init__(self, key, value): | |
self.key = key | |
self.value = value | |
class Resource: | |
def __init__(self, id, items): | |
self.id = id | |
self.metadata = {} |