Command Line Interface
DiracX command-line interface modules and commands.
Jobs Commands
jobs
Attributes
app = AsyncTyper()
module-attribute
available_operators = f'Scalar operators: {', '.join([(op.value) for op in ScalarSearchOperator])}. Vector operators: {', '.join([(op.value) for op in VectorSearchOperator])}.'
module-attribute
Classes
ContentRange
Source code in diracx-cli/src/diracx/cli/jobs.py
Attributes
unit = None
class-attribute
instance-attribute
start = None
class-attribute
instance-attribute
end = None
class-attribute
instance-attribute
total = None
class-attribute
instance-attribute
caption
property
Functions
parse_condition(value)
Source code in diracx-cli/src/diracx/cli/jobs.py
search(parameter=['JobID', 'Status', 'MinorStatus', 'ApplicationStatus', 'JobGroup', 'Site', 'JobName', 'Owner', 'LastUpdateTime'], condition=[], all=False, page=1, per_page=10)
async
Source code in diracx-cli/src/diracx/cli/jobs.py
display(data, content_range)
Source code in diracx-cli/src/diracx/cli/jobs.py
display_rich(data, content_range)
Source code in diracx-cli/src/diracx/cli/jobs.py
submit(jdl)
async
Source code in diracx-cli/src/diracx/cli/jobs.py
Auth Commands
auth
Attributes
app = AsyncTyper()
module-attribute
Classes
Functions
installation_metadata()
async
vo_callback(vo)
Source code in diracx-cli/src/diracx/cli/auth.py
login(vo=None, group=typer.Option(None, help='Group name within the VO. If not provided, the default group for the VO will be used.'), property=typer.Option(None, help='List of properties to add to the default properties of the group. If not provided, default properties of the group will be used.'))
async
Login to the DIRAC system using the device flow.
-
If only VO is provided: Uses the default group and its properties for the VO.
-
If VO and group are provided: Uses the specified group and its properties for the VO.
-
If VO and properties are provided: Uses the default group and combines its properties with the provided properties.
-
If VO, group, and properties are provided: Uses the specified group and combines its properties with the provided properties.
Source code in diracx-cli/src/diracx/cli/auth.py
whoami()
async
logout()
async
Source code in diracx-cli/src/diracx/cli/auth.py
Config Commands
config
Attributes
app = AsyncTyper()
module-attribute
Classes
Functions
dump()
async
display(data)
Source code in diracx-cli/src/diracx/cli/config.py
Internal Commands
Legacy Commands
legacy
Attributes
app = AsyncTyper()
module-attribute
BASE_64_URL_SAFE_PATTERN = '(?:[A-Za-z0-9\\-_]{4})*(?:[A-Za-z0-9\\-_]{2}==|[A-Za-z0-9\\-_]{3}=)?'
module-attribute
LEGACY_EXCHANGE_PATTERN = f'diracx:legacy:({BASE_64_URL_SAFE_PATTERN})'
module-attribute
Classes
IdPConfig
pydantic-model
VOConfig
pydantic-model
Bases: BaseModel
Fields:
-
DefaultGroup(str) -
IdP(IdPConfig) -
UserSubjects(dict[str, str]) -
Support(SupportInfo)
Source code in diracx-cli/src/diracx/cli/internal/legacy.py
Attributes
DefaultGroup
pydantic-field
IdP
pydantic-field
UserSubjects
pydantic-field
Support
pydantic-field
ConversionConfig
pydantic-model
Functions
cs_sync(old_file, new_file)
Load the old CS and convert it to the new YAML format.
Source code in diracx-cli/src/diracx/cli/internal/legacy.py
generate_helm_values(public_cfg=Option(help='Path to the cfg file served by the CS'), secret_cfg=Option(default=None, help='Path to the cfg containing the secret'), output_file=Option(help='Where to dump the yam file'))
Generate an initial values.yaml to run a DiracX installation.
The file generated is not complete, and needs manual editing.
Source code in diracx-cli/src/diracx/cli/internal/legacy.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | |
Internal Config
config
Attributes
app = AsyncTyper()
module-attribute
Classes
Functions
get_repo_path(config_repo_str)
Source code in diracx-cli/src/diracx/cli/internal/config.py
get_config_from_repo_path(repo_path)
generate_cs(config_repo)
Generate a minimal DiracX configuration repository.
Source code in diracx-cli/src/diracx/cli/internal/config.py
add_vo(config_repo, *, vo, default_group='user', idp_url, idp_client_id)
Add a registry entry (vo) to an existing configuration repository.
Source code in diracx-cli/src/diracx/cli/internal/config.py
add_group(config_repo, *, vo, group, properties=['NormalUser'])
Add a group to an existing vo in the configuration repository.
Source code in diracx-cli/src/diracx/cli/internal/config.py
add_user(config_repo, *, vo, groups=None, sub, preferred_username)
Add a user to an existing vo and group.
Source code in diracx-cli/src/diracx/cli/internal/config.py
update_config_and_commit(repo_path, config, message)
Update the yaml file in the repo and commit it.
Source code in diracx-cli/src/diracx/cli/internal/config.py
CLI Utilities
utils
Classes
AsyncTyper
Bases: Typer