GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — How to create new Configs & Variables ? · Issue #3897 · googleapis/google-cloud-python

How to create new Configs & Variables ? #3897

New issue
Copy link
New issue
Copy link
Closed
Closed
How to create new Configs & Variables ?#3897
Copy link
Assignees
chemelnucfin
Labels
api: runtimeconfigIssues related to the Cloud Runtime Config API API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@DazWilkin
DazWilkin
opened on Aug 29, 2017
Issue body actions

The service supports and the documentation suggests that Configs and Variables resources creates methods (should) exist. Reviewing the documentation, I'm unable to find (expected?) create methods for these and reviewing the sources, it's unclear how these could be constructed.

Is it me? Or, are these methods missing?

"Create / interact with ... configs"
https://googlecloudplatform.github.io/google-cloud-python/latest/runtimeconfig/config.html

"Create / interact with ... variables"
https://googlecloudplatform.github.io/google-cloud-python/latest/runtimeconfig/variable.html

Confirm

gcloud beta runtime-config configs list \
--project=${PROJECT}
NAME      DESCRIPTION
exists    Description
gcloud beta runtime-config configs variables list \
--config-name=exists \
--project=${PROJECT}
NAME       UPDATE_TIME
exists     2017-08-29T15:03:26.359064036Z

Getters

from google.cloud import runtimeconfig
client = runtimeconfig.Client()

config = client.config("exists")
print (config.exists())
print (config.get_variable("exists").exists())

Results:

True
True

Setters?

config = client.config("create")
print (config.exists())
config.create()
print (config.exists())

Results:

    config.create()
AttributeError: 'Config' object has no attribute 'create'
print (config.exists())
variable = config.variable("test")
variable.create()

Results:

    variable.create()
AttributeError: 'Variable' object has no attribute 'create'

Activity

  1. lukesneeringer
    added
    api: runtimeconfigIssues related to the Cloud Runtime Config API API.
    type: questionRequest for information or clarification. Not an issue.
    on Sep 1, 2017
  2. lukesneeringer
    assigned
    dhermes
    on Sep 1, 2017
  3. tseaver
    changed the title [-][runtimeconfig] How to create new Configs & Variables ?[/-] [+]How to create new Configs & Variables ?[/+] on Sep 22, 2017
  4. chemelnucfin commented on Jan 11, 2018

    @chemelnucfin
    chemelnucfin
    on Jan 11, 2018
    Contributor
    More actions

    @DazWilkin Hello, I apologize for the late response.

    I looked over the issue, and the create functions are intended not to be there.
    You can use
    config = client.config('config_name') to create a configuration
    https://googlecloudplatform.github.io/google-cloud-python/latest/runtimeconfig/client.html
    and variable = config.variable('variable_name') to create a variable
    https://googlecloudplatform.github.io/google-cloud-python/latest/runtimeconfig/config.html

    Please feel free to reopen if you have any more questions.

  5. chemelnucfin
    closed this as completedon Jan 11, 2018
  6. kw commented on Jan 29, 2018

    @kw
    kw
    on Jan 29, 2018
    More actions

    Those will create the local object, not the config/variable in the cloud. The exists() methods of the created objects will return False if they haven't been created using gcloud or direct HTTP calls. Likewise, Variable doesn't expose any way to set the variable's value in the cloud.

    To put it another way, there's no way to achieve gcloud beta runtime-config configs variables set <NAME> <VALUE> --config-name <CONFIG> using the Python API.

  7. chemelnucfin commented on Jan 29, 2018

    @chemelnucfin
    chemelnucfin
    on Jan 29, 2018
    Contributor
    More actions

    @kw Thanks, I misunderstood. So it seems like these are just not implemented features in the client and not that it shouldn't be there. I will reopen this.

  8. chemelnucfin
    reopened this on Jan 29, 2018
  9. chemelnucfin
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    and removed
    type: questionRequest for information or clarification. Not an issue.
    on Jan 29, 2018
  10. chemelnucfin commented on Feb 24, 2018

    @chemelnucfin
    chemelnucfin
    on Feb 24, 2018
    Contributor
    More actions

    See #4926

  11. chemelnucfin
    closed this as completedon Feb 24, 2018
  12. theacodes
    unassigned
    dhermes
    on Sep 28, 2018
  13. JustinBeckwith
    assigned
    chemelnucfin
    on Feb 1, 2021
  14. parthea
    added a commit that references this issue on Sep 22, 2023

    chore: move samples from python-docs-sample (#33)

    This issue will close once commit 69c4425 is merged into the 'main' branch.
    69c4425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @chemelnucfin
    chemelnucfin

Labels

api: runtimeconfigIssues related to the Cloud Runtime Config API API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.