Skip to content

Commit

Permalink
FR-144 Updated generated UniConfig models
Browse files Browse the repository at this point in the history
- bumped version of the datamodel-codegen because of the bug:
koxudaxi/datamodel-code-generator#1648
  • Loading branch information
jaro0149 committed Apr 5, 2024
1 parent f52fdc5 commit cf23820
Show file tree
Hide file tree
Showing 27 changed files with 1,056 additions and 1,062 deletions.
8 changes: 8 additions & 0 deletions uniconfig/python/frinx_api/uniconfig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from .device.discovery import discover
from .dryrun.manager import dryruncommit
from .gnmi.logging import setmessagetypes
from .gnmi.yang.storage import uploadyangmodel
from .journal import clearjournal
from .journal import readjournal
from .logging import disabledefaultdevicelogging
Expand Down Expand Up @@ -320,6 +321,13 @@ class OperationsDryrunCommitPostResponse(BaseModel):
output: Optional[dryruncommit.Output] = None


class OperationsUploadYangModelPostRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
input: Optional[uploadyangmodel.Input] = None


class OperationsReadJournalPostResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ class NodeResultItem(BaseModel):
populate_by_name=True,
)
node_id: Optional[str] = Field(None, alias='node-id')
topology_id: Optional[str] = Field(None, alias='topology-id')
uniconfig_layer: Optional[bool] = Field(None, alias='uniconfig-layer')
"""
Indicates whether node is installed in UniConfig layer.
"""
topology_id: Optional[str] = Field(None, alias='topology-id')


class NodeResults(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ class Input(BaseModel):
"""
node_id: str = Field(..., alias='node-id')
"""
Node identifier of CLI/NETCONF/GNMI/SUBSCRIPTION node.
Node identifier of CLI/NETCONF/GNMI node.
"""
stream_name: Optional[str] = Field(None, alias='stream-name')
"""
Name of a stream.
"""
max_connection_attempts: Optional[int] = Field(
None, alias='max-connection-attempts', ge=0, le=4294967295
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel
from pydantic import ConfigDict
from pydantic import Field
Expand All @@ -13,5 +15,9 @@ class Input(BaseModel):
)
node_id: str = Field(..., alias='node-id')
"""
Node identifier of CLI/NETCONF/GNMI/SUBSCRIPTION node.
Node identifier of CLI/NETCONF/GNMI node.
"""
stream_name: Optional[str] = Field(None, alias='stream-name')
"""
Name of a stream.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class NodeResultItem(BaseModel):
populate_by_name=True,
)
node_id: Optional[str] = Field(None, alias='node-id')
topology_id: Optional[str] = Field(None, alias='topology-id')
uniconfig_layer: Optional[bool] = Field(None, alias='uniconfig-layer')
"""
Indicates whether node is installed in UniConfig layer.
"""
topology_id: Optional[str] = Field(None, alias='topology-id')


class NodeResults(BaseModel):
Expand Down
Loading

0 comments on commit cf23820

Please sign in to comment.