More renames

This commit is contained in:
Bryce Lampe
2024-03-07 13:51:35 -08:00
parent f294595eef
commit 3427e6115f
47 changed files with 6052 additions and 443 deletions

View File

@@ -23,7 +23,7 @@ If you are not using VSCode, you will need to ensure the following tools are ins
* [.NET](https://dotnet.microsoft.com/download)
### Test the boilerplate XYZ provider before making changes
### Build & test the boilerplate XYZ provider
1. Create a new Github CodeSpaces environment using this repository.
1. Open a terminal in the CodeSpaces environment.

View File

@@ -0,0 +1 @@
Description

View File

@@ -11,11 +11,11 @@ _utilities.register(
resource_modules="""
[
{
"pkg": "xyz",
"pkg": "docker-native",
"mod": "index",
"fqn": "pulumi_xyz",
"fqn": "pulumi_docker_native",
"classes": {
"xyz:index:Random": "Random"
"docker-native:index:Random": "Random"
}
}
]
@@ -23,9 +23,9 @@ _utilities.register(
resource_packages="""
[
{
"pkg": "xyz",
"token": "pulumi:providers:xyz",
"fqn": "pulumi_xyz",
"pkg": "docker-native",
"token": "pulumi:providers:docker-native",
"fqn": "pulumi_docker_native",
"class": "Provider"
}
]

View File

@@ -3,16 +3,18 @@
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import asyncio
import importlib.metadata
import importlib.util
import inspect
import json
import os
import pkg_resources
import sys
import typing
import pulumi
import pulumi.runtime
from pulumi.runtime.sync_await import _sync_await
from semver import VersionInfo as SemverVersion
from parver import Version as PEP440Version
@@ -70,7 +72,7 @@ def _get_semver_version():
# to receive a valid semver string when receiving requests from the language host, so it's our
# responsibility as the library to convert our own PEP440 version into a valid semver string.
pep440_version_string = pkg_resources.require(root_package)[0].version
pep440_version_string = importlib.metadata.version(root_package)
pep440_version = PEP440Version.parse(pep440_version_string)
(major, minor, patch) = pep440_version.release
prerelease = None
@@ -246,5 +248,44 @@ def lift_output_func(func: typing.Any) -> typing.Callable[[_F], _F]:
return (lambda _: lifted_func)
def call_plain(
tok: str,
props: pulumi.Inputs,
res: typing.Optional[pulumi.Resource] = None,
typ: typing.Optional[type] = None,
) -> typing.Any:
"""
Wraps pulumi.runtime.plain to force the output and return it plainly.
"""
output = pulumi.runtime.call(tok, props, res, typ)
# Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
result, known, secret, _ = _sync_await(asyncio.ensure_future(_await_output(output)))
problem = None
if not known:
problem = ' an unknown value'
elif secret:
problem = ' a secret value'
if problem:
raise AssertionError(
f"Plain resource method '{tok}' incorrectly returned {problem}. "
+ "This is an error in the provider, please report this to the provider developer."
)
return result
async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bool, bool, set]:
return (
await o._future,
await o._is_known,
await o._is_secret,
await o._resources,
)
def get_plugin_download_url():
return None
return "github.com/pulumi/pulumi-docker-native"

View File

@@ -27,7 +27,7 @@ class Provider(pulumi.ProviderResource):
opts: Optional[pulumi.ResourceOptions] = None,
__props__=None):
"""
Create a Xyz resource with the given unique name, props, and options.
Create a Docker-native resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
@@ -38,7 +38,7 @@ class Provider(pulumi.ProviderResource):
args: Optional[ProviderArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Create a Xyz resource with the given unique name, props, and options.
Create a Docker-native resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param ProviderArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
@@ -64,7 +64,7 @@ class Provider(pulumi.ProviderResource):
__props__ = ProviderArgs.__new__(ProviderArgs)
super(Provider, __self__).__init__(
'xyz',
'docker-native',
resource_name,
__props__,
opts)

View File

@@ -0,0 +1,5 @@
{
"resource": true,
"name": "docker-native",
"server": "github.com/pulumi/pulumi-docker-native"
}

View File

@@ -80,7 +80,7 @@ class Random(pulumi.CustomResource):
__props__.__dict__["length"] = length
__props__.__dict__["result"] = None
super(Random, __self__).__init__(
'xyz:index:Random',
'docker-native:index:Random',
resource_name,
__props__,
opts)

View File

@@ -1,4 +0,0 @@
{
"resource": true,
"name": "xyz"
}

View File

@@ -3,28 +3,35 @@
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import errno
import os
from setuptools import setup, find_packages
from setuptools.command.install import install
from subprocess import check_call
VERSION = "0.0.0"
VERSION = os.getenv("PULUMI_PYTHON_VERSION", "0.0.0")
def readme():
try:
with open('README.md', encoding='utf-8') as f:
return f.read()
except FileNotFoundError:
return "xyz Pulumi Package - Development Version"
return "docker-native Pulumi Package - Development Version"
setup(name='pulumi_xyz',
python_requires='>=3.7',
setup(name='pulumi_docker_native',
python_requires='>=3.8',
version=VERSION,
description="Description",
long_description=readme(),
long_description_content_type='text/markdown',
keywords='keywords',
url='pulumi.com',
project_urls={
'Repository': 'https://github.com/pulumi/pulumi-docker-native'
},
packages=find_packages(),
package_data={
'pulumi_xyz': [
'pulumi_docker_native': [
'py.typed',
'pulumi-plugin.json',
]